Adding a 'sum' format for inline queries

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a 'sum' format for inline queries

Yaron Koren
Hi,

It's been brought up before on this mailing list, but it would be very helpful, in some circumstances, to have a 'sum' format for #ask queries, that, for a query set to "display" a property of type Number, would return the sum of all the values of that property. Such a format would also probably not take more than an hour or two to implement. Is there a reason such a thing hasn't been added, or it just that no one's done it yet? Also, in what extension would it make the most sense to add it? Presumably it would be in either Semantic MediaWiki or Semantic Result Formats.

-Yaron

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Adding a 'sum' format for inline queries

Nathan R. Yergler-4
I wrote something like that for CC as a result format (well, query
printer?) earlier this year.  I'm not sure it's in source control (the
shame!) but I can find it Monday.

My initial thought was that it makes sense to have this in SRF, but
maybe it's *so* simple it belongs in the core? Not sure.

Nathan

On Sun, Dec 7, 2008 at 12:20 PM, Yaron Koren <[hidden email]> wrote:

> Hi,
> It's been brought up before on this mailing list, but it would be very
> helpful, in some circumstances, to have a 'sum' format for #ask queries,
> that, for a query set to "display" a property of type Number, would return
> the sum of all the values of that property. Such a format would also
> probably not take more than an hour or two to implement. Is there a reason
> such a thing hasn't been added, or it just that no one's done it yet? Also,
> in what extension would it make the most sense to add it? Presumably it
> would be in either Semantic MediaWiki or Semantic Result Formats.
> -Yaron
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Adding a 'sum' format for inline queries

Jie Bao
In reply to this post by Yaron Koren
I vote for Semantic Result Formats

It may also make sense to have "average", "max", "min".

On Sun, Dec 7, 2008 at 3:20 PM, Yaron Koren <[hidden email]> wrote:

> Hi,
> It's been brought up before on this mailing list, but it would be very
> helpful, in some circumstances, to have a 'sum' format for #ask queries,
> that, for a query set to "display" a property of type Number, would return
> the sum of all the values of that property. Such a format would also
> probably not take more than an hour or two to implement. Is there a reason
> such a thing hasn't been added, or it just that no one's done it yet? Also,
> in what extension would it make the most sense to add it? Presumably it
> would be in either Semantic MediaWiki or Semantic Result Formats.
> -Yaron
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>



--
Jie
http://www.cs.rpi.edu/~baojie

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Adding a 'sum' format for inline queries

planetenxin
In reply to this post by Yaron Koren
A few days ago I needed the sum function and found a solution here:
http://www.nabble.com/Spreadsheet-like-operations-on-semantic-query-results-td18474894.html#a18474894
This works fine but need some hacking.

I vote for a better integrated solution, too. Functions like average would also be nice...

/planetenxin
Reply | Threaded
Open this post in threaded view
|

Re: Adding a 'sum' format for inline queries

Gu Zehetner
In reply to this post by Jie Bao
I agree that having to go through all values anyway it should be easy to provide in addition to the sum also min, max, mean, average values.
I have these types of return values already in my SemanticQueryFormTool extension and at least the mean value is rather useful where one wants to distinguish in a display (e.g. GoogleMaps) if a value is above or below the average/mean value.

Cheers,
Gu

--- On Sun, 12/7/08, Jie Bao <[hidden email]> wrote:

> From: Jie Bao <[hidden email]>
> Subject: Re: [Semediawiki-user] Adding a 'sum' format for inline queries
> To: "Yaron Koren" <[hidden email]>
> Cc: "Semantic MediaWiki users" <[hidden email]>
> Date: Sunday, December 7, 2008, 11:58 PM
> I vote for Semantic Result Formats
>
> It may also make sense to have "average",
> "max", "min".
>
> On Sun, Dec 7, 2008 at 3:20 PM, Yaron Koren
> <[hidden email]> wrote:
> > Hi,
> > It's been brought up before on this mailing list,
> but it would be very
> > helpful, in some circumstances, to have a
> 'sum' format for #ask queries,
> > that, for a query set to "display" a
> property of type Number, would return
> > the sum of all the values of that property. Such a
> format would also
> > probably not take more than an hour or two to
> implement. Is there a reason
> > such a thing hasn't been added, or it just that no
> one's done it yet? Also,
> > in what extension would it make the most sense to add
> it? Presumably it
> > would be in either Semantic MediaWiki or Semantic
> Result Formats.
> > -Yaron
> >
> ------------------------------------------------------------------------------
> > SF.Net email is Sponsored by MIX09, March 18-20, 2009
> in Las Vegas, Nevada.
> > The future of the web can't happen without you.
> Join us at MIX09 to help
> > pave the way to the Next Web now. Learn more and
> register at
> >
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> >
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
> >
>
>
>
> --
> Jie
> http://www.cs.rpi.edu/~baojie
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in
> Las Vegas, Nevada.
> The future of the web can't happen without you.  Join
> us at MIX09 to help
> pave the way to the Next Web now. Learn more and register
> at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user


     

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Adding a 'sum' format for inline queries

Yaron Koren
Okay, I just talked to Markus, who said that 'sum' and any other math functions should go into Semantic Result Formats and that the general goal is to get all but the most basic formats (i.e. list, table, etc.) into SRF. And yes, 'average', 'min' and 'max' also make sense.

Nathan, if you have code for 'sum', could you please send it to me?

-Yaron


On Mon, Dec 8, 2008 at 5:27 AM, Gu Zehetner <[hidden email]> wrote:
I agree that having to go through all values anyway it should be easy to provide in addition to the sum also min, max, mean, average values.
I have these types of return values already in my SemanticQueryFormTool extension and at least the mean value is rather useful where one wants to distinguish in a display (e.g. GoogleMaps) if a value is above or below the average/mean value.

Cheers,
Gu

--- On Sun, 12/7/08, Jie Bao <[hidden email]> wrote:

> From: Jie Bao <[hidden email]>
> Subject: Re: [Semediawiki-user] Adding a 'sum' format for inline queries
> To: "Yaron Koren" <[hidden email]>
> Cc: "Semantic MediaWiki users" <[hidden email]>
> Date: Sunday, December 7, 2008, 11:58 PM
> I vote for Semantic Result Formats
>
> It may also make sense to have "average",
> "max", "min".
>
> On Sun, Dec 7, 2008 at 3:20 PM, Yaron Koren
> <[hidden email]> wrote:
> > Hi,
> > It's been brought up before on this mailing list,
> but it would be very
> > helpful, in some circumstances, to have a
> 'sum' format for #ask queries,
> > that, for a query set to "display" a
> property of type Number, would return
> > the sum of all the values of that property. Such a
> format would also
> > probably not take more than an hour or two to
> implement. Is there a reason
> > such a thing hasn't been added, or it just that no
> one's done it yet? Also,
> > in what extension would it make the most sense to add
> it? Presumably it
> > would be in either Semantic MediaWiki or Semantic
> Result Formats.
> > -Yaron
> >
> ------------------------------------------------------------------------------
> > SF.Net email is Sponsored by MIX09, March 18-20, 2009
> in Las Vegas, Nevada.
> > The future of the web can't happen without you.
> Join us at MIX09 to help
> > pave the way to the Next Web now. Learn more and
> register at
> >
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> >
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
> >
>
>
>
> --
> Jie
> http://www.cs.rpi.edu/~baojie
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in
> Las Vegas, Nevada.
> The future of the web can't happen without you.  Join
> us at MIX09 to help
> pave the way to the Next Web now. Learn more and register
> at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user





------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user