Great. I should note that a solution of this type isn't quite as ideal as it first seems: the numbers don't get updated automatically. The easiest way to get them to update is to resave the template that all the state pages use (assuming they use a template); you'll have to, of course, make a small change first.
-Yaron On Wed, Mar 18, 2009 at 6:48 PM, dmanzo <[email protected]> wrote: > > Wow, you're awesome! At first I created categories for each of the > "states" in my example and inserted the query as you suggested. That > worked for a table output but not for googlecharts. Once I created > the pages with the count property and query WHOLLA! Thanks again for > your time and dedication to this project. Hopefully I'll be able to > share a launch of my site soon w/ you. > > On Mar 18, 4:07 pm, Yaron Koren <[email protected]> wrote: > > Well, the solution to this is the same one presented in that page you > first > > linked to: create a page for each one of the 50 states, with a property > call > > pointing to a query. To borrow from your code, it would probably look > > something like this: > > > > [[Has number of people::{{#ask: > > [[Category:People]] [[Has Lived in State::{{PAGENAME}}]] > > | ?Has Lived in State|format=count}}]] > > > > The graph itself would then query that "Has number of people" property. > > > > -Yaron > > > > On Wed, Mar 18, 2009 at 2:26 PM, dmanzo <[email protected]> wrote: > > > > > in other words, I'm trying to create a variable that lists "# of > > > people that have lived in MD", "#of people that have lived in CA" etc, > > > without having to create 52 new properties. > > > > > On Mar 18, 1:06 pm, dmanzo <[email protected]> wrote: > > > > Im trying to count the number of people who have lived in a state, > but > > > > I want to count all states, for all people. > > > > > > On Mar 17, 10:25 pm, Yaron Koren <[email protected]> wrote: > > > > > > > That last call looks like an attempt to count the number of states > each > > > > > person has lived in, as opposed to the number of people who have > lived > > > in a > > > > > state. Are you trying to count both? > > > > > > > On Tue, Mar 17, 2009 at 7:13 PM, dmanzo <[email protected]> > wrote: > > > > > > > > Also, my template has the following wikitext: > > > > > > | [[Has Lived in State Count::{{#ask:[[Has Lived in > > > State::{{#arraymap: > > > > > > {{{Has Lived in State|}}}| ,|x| [[Has Lived in State::x]] }} ]] | > > > > > > format=count}}| ]] > > > > > > which isnt "counting" right now... > > > > > > > > On Mar 17, 6:57 pm, dmanzo <[email protected]> wrote: > > > > > > > Thanks Yaron for the reply. I am using the #arraymap function, > > > within > > > > > > > a template, which I dont think should be a problem. I get the > > > "count" > > > > > > > ok when I use the following call: > > > > > > > > > Count of People who have lived in California: {{#ask: > > > > > > > [[Category:People]] [[Has Lived in State::California]] > > > > > > > | ?Has Lived in State|format=count}} > > > > > > > > > But still struggling with how to get all the states > (aggregated/ > > > > > > > distributed) into a call to graph the values.... > > > > > > > > > On Mar 17, 10:20 am, Yaron Koren <[email protected]> wrote: > > > > > > > > > > You should use the #arraymap function to separate out the > values > > > of > > > > > > each > > > > > > > > property: > > > > >http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Multiple_value. > > > > > > .. > > > > > > > > > > -Yaron > > > > > > > > > > On Tue, Mar 17, 2009 at 8:31 AM, dmanzo < > [email protected]> > > > wrote: > > > > > > > > > > > Hello all: > > > > > > > > > > > I am trying to do some googlepie charts using multiple > values. > > > For > > > > > > > > > example, I want to count all people that have lived in New > > > York, and > > > > > > I > > > > > > > > > have a property that is titled, "Has Lived in States". > Will > > > the > > > > > > count > > > > > > > > > still work when there are multiple values (separated by a > > > comma) for > > > > > > a > > > > > > > > > given property? > > > > > > > > > > > I.e: I have lived in New York, Maryland, California > > > > > > > > > > > So the distribution should be New York=1, Maryland=1, > > > California=1 > > > > > > > > > > > The distribution count page I am referencing is: > > > > >http://semantic-mediawiki.org/wiki/Help:Displaying_numerical_distribu. > .. > > > > > > > > > . > > > > > > > > > > > Thanks, > > > > > > > > > Dave > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Semantic Forms" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/semantic-forms?hl=en -~----------~----~----~----~------~----~------~--~---
