Re: [Wikidata] Query Assistance

2017-04-10 Thread James Heald

On 10/04/2017 04:58, Brill Lyle wrote:

It is very logical. You're right. I understand this now that I see it
built

Ah, the key is the wdt:P276*/wdt:P131* wd:Q771 That captures the Boston
and environs. This is great.

What does "BIND ('1' AS ?ma)" mean explicitly. I saw on the User Manual it
binds together location -- but I want to be able to customize this for the
various locales -- and be able to explain this to Heather so she can do it
herself as well

Thanks so much! I really appreciate this help.

- Erika



So at the moment the query is looking for any of those columns to have a 
value located in the state of Massachusetts (Q771).   To change the 
geographical requirement to anywhere else, simply change all the Q771 
requirements to some other Q value.


The '?' in SPARQL is used to indicate what follows is a user-defined 
variable -- the same way that '$' as in '$count' is used in some other 
programming languages.


So '?ma' is simply a variable we are setting if one of the OPTIONAL{} 
clauses has found a value in Massachusetts.  It's our variable, so we 
could change the name to whatever we like, eg '$local', '$in_state', 
'$include', '$okay'... whatever, so long as the same change is made all 
the way through.


BIND() is the SPARQL keyword to set the value of a variable -- so all 
this line is doing is what in another programming language might be

LET $ma = 1
-- ie setting the value of our variable ?ma to 1 if we like what the 
OPTIONAL{} clause has found.


Later the line
   FILTER(bound(?ma))
is used to require that the variable ?ma has indeed been set to 
something -- ie, in our case, that at least one of the OPTIONAL{} 
clauses has found a value that means we want to include the line.



Here's one further version of the query:
http://tinyurl.com/l8eybae
which runs a little bit more quickly.

The difference is I have added a 'hint' to the geographic tests, so they 
now read

?placeBirth wdt:P276*/wdt:P131* wd:Q771 .
hint:Prior hint:gearing "forward" .

The hint tells the query engine to check these conditions by starting at 
the place of birth, and then going *forward* to find all the geographic 
units that include that place of birth, and see if any of those include 
the state of Massachusetts -- rather than starting at the state of 
Massachusetts, then going backwards to find all the places that are 
inside the state (a far bigger question), and seeing if any of those 
places is the birth place.


Including these hints makes the query run about 4x more quickly.


Hope this helps,

All best regards,

James.

___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread Brill Lyle
It is very logical. You're right. I understand this now that I see it
built

Ah, the key is the wdt:P276*/wdt:P131* wd:Q771 That captures the Boston
and environs. This is great.

What does "BIND ('1' AS ?ma)" mean explicitly. I saw on the User Manual it
binds together location -- but I want to be able to customize this for the
various locales -- and be able to explain this to Heather so she can do it
herself as well

Thanks so much! I really appreciate this help.

- Erika


*Erika Herzog*
Wikipedia *User:BrillLyle *

On Sun, Apr 9, 2017 at 6:37 PM, James Heald  wrote:

> Query with a column for employers as well:
> (also slightly simplifed, structurally).
>
>http://tinyurl.com/kz65akx
>
> It does in fact add a few more hits -- as Jan predicted, mostly for
> university employers.
>
>   -- James.
>
>
>
> On 09/04/2017 23:30, James Heald wrote:
>
>> This query may start to be more or less what you are looking for
>>
>>   http://tinyurl.com/lclgpgx
>>
>> It's actually pretty simple to understand if you (a) start in the
>> middle, then (b) work through what each line means.
>>
>> I haven't added employer location, though it would only take a couple of
>> seconds to do; though as Jan says, it might not add many more hits as
>> the data on the relevant employer location might be far from complete.
>>
>> (Property P937 "work location" is also available, and sometimes used for
>> artists; but even for artists the data is very very sparsely populated).
>>
>> Similarly there may well be fewer hits than there should be, because the
>> data for place of birth, death, education, residence etc may simply not
>> have been added to Wikidata.  But this does let you see what we do have,
>> so I hope it is of help.
>>
>> All best regards,
>>
>>James.
>>
>>
>> On 09/04/2017 21:53, Brill Lyle wrote:
>>
>>> Agree.
>>>
>>> Employed by is something that might complement the "main" query.
>>>
>>> For example, Tim Berners-Lee, employed by MIT's Computer Science and
>>> Artificial Intelligence Laboratory, etc.
>>>
>>>
>>
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread James Heald

Query with a column for employers as well:
(also slightly simplifed, structurally).

   http://tinyurl.com/kz65akx

It does in fact add a few more hits -- as Jan predicted, mostly for 
university employers.


  -- James.


On 09/04/2017 23:30, James Heald wrote:

This query may start to be more or less what you are looking for

  http://tinyurl.com/lclgpgx

It's actually pretty simple to understand if you (a) start in the
middle, then (b) work through what each line means.

I haven't added employer location, though it would only take a couple of
seconds to do; though as Jan says, it might not add many more hits as
the data on the relevant employer location might be far from complete.

(Property P937 "work location" is also available, and sometimes used for
artists; but even for artists the data is very very sparsely populated).

Similarly there may well be fewer hits than there should be, because the
data for place of birth, death, education, residence etc may simply not
have been added to Wikidata.  But this does let you see what we do have,
so I hope it is of help.

All best regards,

   James.


On 09/04/2017 21:53, Brill Lyle wrote:

Agree.

Employed by is something that might complement the "main" query.

For example, Tim Berners-Lee, employed by MIT's Computer Science and
Artificial Intelligence Laboratory, etc.






___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread James Heald

This query may start to be more or less what you are looking for

  http://tinyurl.com/lclgpgx

It's actually pretty simple to understand if you (a) start in the 
middle, then (b) work through what each line means.


I haven't added employer location, though it would only take a couple of 
seconds to do; though as Jan says, it might not add many more hits as 
the data on the relevant employer location might be far from complete.


(Property P937 "work location" is also available, and sometimes used for 
artists; but even for artists the data is very very sparsely populated).


Similarly there may well be fewer hits than there should be, because the 
data for place of birth, death, education, residence etc may simply not 
have been added to Wikidata.  But this does let you see what we do have, 
so I hope it is of help.


All best regards,

   James.


On 09/04/2017 21:53, Brill Lyle wrote:

Agree.

Employed by is something that might complement the "main" query.

For example, Tim Berners-Lee, employed by MIT's Computer Science and
Artificial Intelligence Laboratory, etc.




___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread Brill Lyle
Agree.

Employed by is something that might complement the "main" query.

For example, Tim Berners-Lee, employed by MIT's Computer Science and
Artificial Intelligence Laboratory, etc.


*Erika Herzog*
Wikipedia *User:BrillLyle *

On Sun, Apr 9, 2017 at 3:57 PM, Jan Ainali  wrote:

> Good, that makes it a lot clearer (but unfortunately a bit harder, one
> specific or all would be simple).
>
> Employed by is also possible, but might not give the results you seek. Or
> perhaps you will if they are mainly employed by universities, but in
> general I don't believe many companies have all their local offices as
> items (yet). E.g.a big bank that has at least one office in every major
> city in a country probably only have an item for the company (and maybe
> headquarter).
>
> Med vänliga hälsningar
> Jan Ainali
> http://ainali.com
>
> 2017-04-09 21:47 GMT+02:00 Brill Lyle :
>
>> I hope it is possible to do this query. It will be very helpful for
>> administering task lists for each event.
>>
>> The idea is that all of the different information:
>> - residence (P551)
>> - place of birth (P19)
>> - place of death (P20)
>> - educated at (P69)
>> and maybe
>> - employed by
>>
>> would be query-able by location.
>>
>> So the output would be any of the above elements matching Boston and
>> environs.
>>
>> It would be a way to parse the master task list for anyone connected to
>> Boston and environs. So then Heather can curate the task list to fit the
>> editathon / event at Boston University.
>>
>> That would mean any or all of the elements would locate the subject in
>> Boston and environs and/or at Boston University.
>>
>> - Erika
>>
>>
>> *Erika Herzog*
>> Wikipedia *User:BrillLyle *
>>
>> On Sun, Apr 9, 2017 at 1:03 PM, Jan Ainali  wrote:
>>
>>> What is that you want to restrict by place?
>>> Place of birth, place of death, residence or where they were educated?
>>> Or should all these be restricted or should the restriction be that at
>>> least one of them should be there (or some other combination)?
>>> It is probably doable, but more information is needed.
>>>
>>> Med vänliga hälsningar
>>> Jan Ainali
>>> http://ainali.com
>>>
>>> 2017-04-09 18:54 GMT+02:00 Erika Herzog aka BrillLyle <
>>> wp.brilll...@gmail.com>:
>>>
 Is there a way to restrict the query to all geographic places in
 Massachusetts possibly? Or even just Boston? And/or Boston University?

 I am glad for the query below but it somewhat replicates the Listeria
 table we have set up currently, so it's helpful but at the same time a bit
 more faceted searching would help.

 Heather will be doing this query by geographic location depending on
 where she is holding the Black Lunch Table editathons. Right now they are
 only in locations in North America but they will be potentially expanding
 to South Africa and Europe soon.

 Thanks again -- and in advance if this query is possible.

 Best,

 - Erika

 On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON <
 vigneron.nico...@gmail.com> wrote:

 Hi,

 Somtehing like this ? https://query.wikidata.org/#SE
 LECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3Foccupati
 onLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%3Fresid
 enceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%3Fitem%
 20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%20%7B%20%
 3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%20OPTIONA
 L%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%20%7D%
 0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%3FplaceB
 irth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP20%
 20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
 20wdt%3AP551%20%3Fresidence%20%7D%0A%20%20OPTIONAL%20%7B%
 20%3Fitem%20wdt%3AP69%20%3Feducation%20%7D%0A%20%
 20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%
 20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D

 Cdlt, ~nicolas

 2017-04-08 3:39 GMT+02:00 Brill Lyle :

> Hi there,
>
> I need to do a Wikidata query of the Black Lunch Table task list that
> includes location-specific faceted searching:
>
> So for the upcoming Boston event, would like to be able to search by
> - residence (P551)
> - place of birth (P19)
> - place of death (P20)
> - educated at (P69)
> and maybe
> - employed by
>
> Here's the Listeria table:
> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
> able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>
> It would be for this event:
> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
> able/Boston_Univ_Apr2017_1
>
> The query would provide data that could be curated / vetted / updated
> on Wikidata to populate the Listeria table on the Boston 1 page.
>
> Thanks in 

Re: [Wikidata] Query Assistance

2017-04-09 Thread Jan Ainali
Good, that makes it a lot clearer (but unfortunately a bit harder, one
specific or all would be simple).

Employed by is also possible, but might not give the results you seek. Or
perhaps you will if they are mainly employed by universities, but in
general I don't believe many companies have all their local offices as
items (yet). E.g.a big bank that has at least one office in every major
city in a country probably only have an item for the company (and maybe
headquarter).

Med vänliga hälsningar
Jan Ainali
http://ainali.com

2017-04-09 21:47 GMT+02:00 Brill Lyle :

> I hope it is possible to do this query. It will be very helpful for
> administering task lists for each event.
>
> The idea is that all of the different information:
> - residence (P551)
> - place of birth (P19)
> - place of death (P20)
> - educated at (P69)
> and maybe
> - employed by
>
> would be query-able by location.
>
> So the output would be any of the above elements matching Boston and
> environs.
>
> It would be a way to parse the master task list for anyone connected to
> Boston and environs. So then Heather can curate the task list to fit the
> editathon / event at Boston University.
>
> That would mean any or all of the elements would locate the subject in
> Boston and environs and/or at Boston University.
>
> - Erika
>
>
> *Erika Herzog*
> Wikipedia *User:BrillLyle *
>
> On Sun, Apr 9, 2017 at 1:03 PM, Jan Ainali  wrote:
>
>> What is that you want to restrict by place?
>> Place of birth, place of death, residence or where they were educated?
>> Or should all these be restricted or should the restriction be that at
>> least one of them should be there (or some other combination)?
>> It is probably doable, but more information is needed.
>>
>> Med vänliga hälsningar
>> Jan Ainali
>> http://ainali.com
>>
>> 2017-04-09 18:54 GMT+02:00 Erika Herzog aka BrillLyle <
>> wp.brilll...@gmail.com>:
>>
>>> Is there a way to restrict the query to all geographic places in
>>> Massachusetts possibly? Or even just Boston? And/or Boston University?
>>>
>>> I am glad for the query below but it somewhat replicates the Listeria
>>> table we have set up currently, so it's helpful but at the same time a bit
>>> more faceted searching would help.
>>>
>>> Heather will be doing this query by geographic location depending on
>>> where she is holding the Black Lunch Table editathons. Right now they are
>>> only in locations in North America but they will be potentially expanding
>>> to South Africa and Europe soon.
>>>
>>> Thanks again -- and in advance if this query is possible.
>>>
>>> Best,
>>>
>>> - Erika
>>>
>>> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON 
>>> wrote:
>>>
>>> Hi,
>>>
>>> Somtehing like this ? https://query.wikidata.org/#SE
>>> LECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3Foccupati
>>> onLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%
>>> 3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%
>>> 3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%
>>> 20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%
>>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%
>>> 20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%
>>> 3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
>>> 20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%
>>> 20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%
>>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%
>>> 7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%
>>> 3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
>>>
>>> Cdlt, ~nicolas
>>>
>>> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>>>
 Hi there,

 I need to do a Wikidata query of the Black Lunch Table task list that
 includes location-specific faceted searching:

 So for the upcoming Boston event, would like to be able to search by
 - residence (P551)
 - place of birth (P19)
 - place of death (P20)
 - educated at (P69)
 and maybe
 - employed by

 Here's the Listeria table:
 https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
 able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list

 It would be for this event:
 https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
 able/Boston_Univ_Apr2017_1

 The query would provide data that could be curated / vetted / updated
 on Wikidata to populate the Listeria table on the Boston 1 page.

 Thanks in advance for any help with this.

 - Erika

 *Erika Herzog*
 Wikipedia *User:BrillLyle
 *

 ___
 Wikidata mailing list
 Wikidata@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikidata


>>> ___
>>> Wikidata mailing list
>>> Wikidata@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/li

Re: [Wikidata] Query Assistance

2017-04-09 Thread Brill Lyle
The output would end up on a page like this one, in a Listeria table for
the event(s)

https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_Table/Boston_Univ_Apr2017_1#Wikidata_task_list


*Erika Herzog*
Wikipedia *User:BrillLyle *

On Sun, Apr 9, 2017 at 3:47 PM, Brill Lyle  wrote:

> I hope it is possible to do this query. It will be very helpful for
> administering task lists for each event.
>
> The idea is that all of the different information:
> - residence (P551)
> - place of birth (P19)
> - place of death (P20)
> - educated at (P69)
> and maybe
> - employed by
>
> would be query-able by location.
>
> So the output would be any of the above elements matching Boston and
> environs.
>
> It would be a way to parse the master task list for anyone connected to
> Boston and environs. So then Heather can curate the task list to fit the
> editathon / event at Boston University.
>
> That would mean any or all of the elements would locate the subject in
> Boston and environs and/or at Boston University.
>
> - Erika
>
>
> *Erika Herzog*
> Wikipedia *User:BrillLyle *
>
> On Sun, Apr 9, 2017 at 1:03 PM, Jan Ainali  wrote:
>
>> What is that you want to restrict by place?
>> Place of birth, place of death, residence or where they were educated?
>> Or should all these be restricted or should the restriction be that at
>> least one of them should be there (or some other combination)?
>> It is probably doable, but more information is needed.
>>
>> Med vänliga hälsningar
>> Jan Ainali
>> http://ainali.com
>>
>> 2017-04-09 18:54 GMT+02:00 Erika Herzog aka BrillLyle <
>> wp.brilll...@gmail.com>:
>>
>>> Is there a way to restrict the query to all geographic places in
>>> Massachusetts possibly? Or even just Boston? And/or Boston University?
>>>
>>> I am glad for the query below but it somewhat replicates the Listeria
>>> table we have set up currently, so it's helpful but at the same time a bit
>>> more faceted searching would help.
>>>
>>> Heather will be doing this query by geographic location depending on
>>> where she is holding the Black Lunch Table editathons. Right now they are
>>> only in locations in North America but they will be potentially expanding
>>> to South Africa and Europe soon.
>>>
>>> Thanks again -- and in advance if this query is possible.
>>>
>>> Best,
>>>
>>> - Erika
>>>
>>> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON 
>>> wrote:
>>>
>>> Hi,
>>>
>>> Somtehing like this ? https://query.wikidata.org/#SE
>>> LECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3Foccupati
>>> onLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%
>>> 3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%
>>> 3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%
>>> 20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%
>>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%
>>> 20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%
>>> 3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
>>> 20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%
>>> 20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%
>>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%
>>> 7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%
>>> 3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
>>>
>>> Cdlt, ~nicolas
>>>
>>> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>>>
 Hi there,

 I need to do a Wikidata query of the Black Lunch Table task list that
 includes location-specific faceted searching:

 So for the upcoming Boston event, would like to be able to search by
 - residence (P551)
 - place of birth (P19)
 - place of death (P20)
 - educated at (P69)
 and maybe
 - employed by

 Here's the Listeria table:
 https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
 able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list

 It would be for this event:
 https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
 able/Boston_Univ_Apr2017_1

 The query would provide data that could be curated / vetted / updated
 on Wikidata to populate the Listeria table on the Boston 1 page.

 Thanks in advance for any help with this.

 - Erika

 *Erika Herzog*
 Wikipedia *User:BrillLyle
 *

 ___
 Wikidata mailing list
 Wikidata@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikidata


>>> ___
>>> Wikidata mailing list
>>> Wikidata@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>>
>>>
>>> ___
>>> Wikidata mailing list
>>> Wikidata@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>>
>>>
>>
>> _

Re: [Wikidata] Query Assistance

2017-04-09 Thread Brill Lyle
I hope it is possible to do this query. It will be very helpful for
administering task lists for each event.

The idea is that all of the different information:
- residence (P551)
- place of birth (P19)
- place of death (P20)
- educated at (P69)
and maybe
- employed by

would be query-able by location.

So the output would be any of the above elements matching Boston and
environs.

It would be a way to parse the master task list for anyone connected to
Boston and environs. So then Heather can curate the task list to fit the
editathon / event at Boston University.

That would mean any or all of the elements would locate the subject in
Boston and environs and/or at Boston University.

- Erika


*Erika Herzog*
Wikipedia *User:BrillLyle *

On Sun, Apr 9, 2017 at 1:03 PM, Jan Ainali  wrote:

> What is that you want to restrict by place?
> Place of birth, place of death, residence or where they were educated?
> Or should all these be restricted or should the restriction be that at
> least one of them should be there (or some other combination)?
> It is probably doable, but more information is needed.
>
> Med vänliga hälsningar
> Jan Ainali
> http://ainali.com
>
> 2017-04-09 18:54 GMT+02:00 Erika Herzog aka BrillLyle <
> wp.brilll...@gmail.com>:
>
>> Is there a way to restrict the query to all geographic places in
>> Massachusetts possibly? Or even just Boston? And/or Boston University?
>>
>> I am glad for the query below but it somewhat replicates the Listeria
>> table we have set up currently, so it's helpful but at the same time a bit
>> more faceted searching would help.
>>
>> Heather will be doing this query by geographic location depending on
>> where she is holding the Black Lunch Table editathons. Right now they are
>> only in locations in North America but they will be potentially expanding
>> to South Africa and Europe soon.
>>
>> Thanks again -- and in advance if this query is possible.
>>
>> Best,
>>
>> - Erika
>>
>> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON 
>> wrote:
>>
>> Hi,
>>
>> Somtehing like this ? https://query.wikidata.org/#SE
>> LECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%
>> 3FoccupationLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%
>> 20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%
>> 20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%
>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%
>> 0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%
>> 3Foccupation%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
>> 20wdt%3AP19%20%3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%
>> 20%3Fitem%20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%
>> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP551%20%3Fresidence%
>> 20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%
>> 3Feducation%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%
>> 20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
>>
>> Cdlt, ~nicolas
>>
>> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>>
>>> Hi there,
>>>
>>> I need to do a Wikidata query of the Black Lunch Table task list that
>>> includes location-specific faceted searching:
>>>
>>> So for the upcoming Boston event, would like to be able to search by
>>> - residence (P551)
>>> - place of birth (P19)
>>> - place of death (P20)
>>> - educated at (P69)
>>> and maybe
>>> - employed by
>>>
>>> Here's the Listeria table:
>>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>>> able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>>>
>>> It would be for this event:
>>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>>> able/Boston_Univ_Apr2017_1
>>>
>>> The query would provide data that could be curated / vetted / updated on
>>> Wikidata to populate the Listeria table on the Boston 1 page.
>>>
>>> Thanks in advance for any help with this.
>>>
>>> - Erika
>>>
>>> *Erika Herzog*
>>> Wikipedia *User:BrillLyle
>>> *
>>>
>>> ___
>>> Wikidata mailing list
>>> Wikidata@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>>
>>>
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>
>>
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>
>>
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread Jan Ainali
What is that you want to restrict by place?
Place of birth, place of death, residence or where they were educated?
Or should all these be restricted or should the restriction be that at
least one of them should be there (or some other combination)?
It is probably doable, but more information is needed.

Med vänliga hälsningar
Jan Ainali
http://ainali.com

2017-04-09 18:54 GMT+02:00 Erika Herzog aka BrillLyle <
wp.brilll...@gmail.com>:

> Is there a way to restrict the query to all geographic places in
> Massachusetts possibly? Or even just Boston? And/or Boston University?
>
> I am glad for the query below but it somewhat replicates the Listeria
> table we have set up currently, so it's helpful but at the same time a bit
> more faceted searching would help.
>
> Heather will be doing this query by geographic location depending on where
> she is holding the Black Lunch Table editathons. Right now they are only in
> locations in North America but they will be potentially expanding to South
> Africa and Europe soon.
>
> Thanks again -- and in advance if this query is possible.
>
> Best,
>
> - Erika
>
> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON 
> wrote:
>
> Hi,
>
> Somtehing like this ? https://query.wikidata.org/#SELECT%20%3Fitem%20%
> 3FitemLabel%20%3FgenderLabel%20%3FoccupationLabel%20%3FplaceBirthLabel%20%
> 3FplaceDeathLabel%20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%
> 7B%0A%20%20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%
> 0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%
> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%
> 20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%
> 3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
> 20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%
> 20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%
> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%
> 7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%
> 3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
>
> Cdlt, ~nicolas
>
> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>
>> Hi there,
>>
>> I need to do a Wikidata query of the Black Lunch Table task list that
>> includes location-specific faceted searching:
>>
>> So for the upcoming Boston event, would like to be able to search by
>> - residence (P551)
>> - place of birth (P19)
>> - place of death (P20)
>> - educated at (P69)
>> and maybe
>> - employed by
>>
>> Here's the Listeria table:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>> able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>>
>> It would be for this event:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>> able/Boston_Univ_Apr2017_1
>>
>> The query would provide data that could be curated / vetted / updated on
>> Wikidata to populate the Listeria table on the Boston 1 page.
>>
>> Thanks in advance for any help with this.
>>
>> - Erika
>>
>> *Erika Herzog*
>> Wikipedia *User:BrillLyle *
>>
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>
>>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread Erika Herzog aka BrillLyle
Is there a way to restrict the query to all geographic places in Massachusetts 
possibly? Or even just Boston? And/or Boston University? 

I am glad for the query below but it somewhat replicates the Listeria table we 
have set up currently, so it's helpful but at the same time a bit more faceted 
searching would help. 

Heather will be doing this query by geographic location depending on where she 
is holding the Black Lunch Table editathons. Right now they are only in 
locations in North America but they will be potentially expanding to South 
Africa and Europe soon. 

Thanks again -- and in advance if this query is possible. 

Best,

- Erika 

> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON  
> wrote:
> 
> Hi,
> 
> Somtehing like this ? 
> https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3FoccupationLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
> 
> Cdlt, ~nicolas
> 
> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>> Hi there,
>> 
>> I need to do a Wikidata query of the Black Lunch Table task list that 
>> includes location-specific faceted searching:
>> 
>> So for the upcoming Boston event, would like to be able to search by
>> - residence (P551)
>> - place of birth (P19)
>> - place of death (P20)
>> - educated at (P69)
>> and maybe
>> - employed by
>> 
>> Here's the Listeria table:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_Table/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>> 
>> It would be for this event:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_Table/Boston_Univ_Apr2017_1
>> 
>> The query would provide data that could be curated / vetted / updated on 
>> Wikidata to populate the Listeria table on the Boston 1 page.
>> 
>> Thanks in advance for any help with this.
>> 
>> - Erika
>> 
>> Erika Herzog
>> Wikipedia User:BrillLyle
>> 
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>> 
> 
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-09 Thread Jonas Kress
>Was it difficult to construct?
It is pretty easy to create such a query with the Query Helper
 .
I have created a video

for
you to show you how it works modifying an existing query ( cats ).

Cheers,
Jonas

2017-04-09 2:25 GMT+02:00 Erika Herzog aka BrillLyle :

> Oh my. Yes!
>
> Was it difficult to construct? I haven't run many queries yet.
>
> Grateful thanks for this! I will show it to Heather from Black Lunch
> Table.
>
> Heather and I did a Wikidata intensive last Saturday that went really well
> -- she totally got it and I'm hopeful the work will be very impactful. I'm
> also very excited at this integration of Wikidata into outreach initiative
> task lists. It makes it so that Wikidata is part of the conversation at her
> editathons from the get-go now, and supports notability via Authority
> control identifiers. Love it!
>
> Thanks again!!!
>
> - Erika
>
> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON 
> wrote:
>
> Hi,
>
> Somtehing like this ? https://query.wikidata.org/#SELECT%20%3Fitem%20%
> 3FitemLabel%20%3FgenderLabel%20%3FoccupationLabel%20%3FplaceBirthLabel%20%
> 3FplaceDeathLabel%20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%
> 7B%0A%20%20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%
> 0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%
> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%
> 20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%
> 3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%
> 20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%
> 20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%
> 20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%
> 7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%
> 3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
>
> Cdlt, ~nicolas
>
> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>
>> Hi there,
>>
>> I need to do a Wikidata query of the Black Lunch Table task list that
>> includes location-specific faceted searching:
>>
>> So for the upcoming Boston event, would like to be able to search by
>> - residence (P551)
>> - place of birth (P19)
>> - place of death (P20)
>> - educated at (P69)
>> and maybe
>> - employed by
>>
>> Here's the Listeria table:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>> able/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>>
>> It would be for this event:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_T
>> able/Boston_Univ_Apr2017_1
>>
>> The query would provide data that could be curated / vetted / updated on
>> Wikidata to populate the Listeria table on the Boston 1 page.
>>
>> Thanks in advance for any help with this.
>>
>> - Erika
>>
>> *Erika Herzog*
>> Wikipedia *User:BrillLyle *
>>
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>>
>>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>


-- 
Jonas Kress
Software Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
http://wikimedia.de

Imagine a world, in which every single human being can freely share in the
sum of all knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/681/51985.
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-08 Thread Erika Herzog aka BrillLyle
Oh my. Yes!

Was it difficult to construct? I haven't run many queries yet. 

Grateful thanks for this! I will show it to Heather from Black Lunch Table. 

Heather and I did a Wikidata intensive last Saturday that went really well -- 
she totally got it and I'm hopeful the work will be very impactful. I'm also 
very excited at this integration of Wikidata into outreach initiative task 
lists. It makes it so that Wikidata is part of the conversation at her 
editathons from the get-go now, and supports notability via Authority control 
identifiers. Love it!

Thanks again!!!

- Erika

> On Apr 8, 2017, at 2:58 AM, Nicolas VIGNERON  
> wrote:
> 
> Hi,
> 
> Somtehing like this ? 
> https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3FoccupationLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D
> 
> Cdlt, ~nicolas
> 
> 2017-04-08 3:39 GMT+02:00 Brill Lyle :
>> Hi there,
>> 
>> I need to do a Wikidata query of the Black Lunch Table task list that 
>> includes location-specific faceted searching:
>> 
>> So for the upcoming Boston event, would like to be able to search by
>> - residence (P551)
>> - place of birth (P19)
>> - place of death (P20)
>> - educated at (P69)
>> and maybe
>> - employed by
>> 
>> Here's the Listeria table:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_Table/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>> 
>> It would be for this event:
>> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_Table/Boston_Univ_Apr2017_1
>> 
>> The query would provide data that could be curated / vetted / updated on 
>> Wikidata to populate the Listeria table on the Boston 1 page.
>> 
>> Thanks in advance for any help with this.
>> 
>> - Erika
>> 
>> Erika Herzog
>> Wikipedia User:BrillLyle
>> 
>> ___
>> Wikidata mailing list
>> Wikidata@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikidata
>> 
> 
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Assistance

2017-04-07 Thread Nicolas VIGNERON
Hi,

Somtehing like this ?
https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3FgenderLabel%20%3FoccupationLabel%20%3FplaceBirthLabel%20%3FplaceDeathLabel%20%3FresidenceLabel%20%3FeducationLabel%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP972%20wd%3AQ28781198%20.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP21%20%3Fgender%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP106%20%3Foccupation%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP19%20%3FplaceBirth%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP20%20%3FplaceDeath%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP551%20%3Fresidence%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP69%20%3Feducation%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D

Cdlt, ~nicolas

2017-04-08 3:39 GMT+02:00 Brill Lyle :

> Hi there,
>
> I need to do a Wikidata query of the Black Lunch Table task list that
> includes location-specific faceted searching:
>
> So for the upcoming Boston event, would like to be able to search by
> - residence (P551)
> - place of birth (P19)
> - place of death (P20)
> - educated at (P69)
> and maybe
> - employed by
>
> Here's the Listeria table:
> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_
> Table/Lists_of_Articles#Black_Lunch_Table_Project_Wikidata_task_list
>
> It would be for this event:
> https://en.wikipedia.org/wiki/Wikipedia:Meetup/Black_Lunch_
> Table/Boston_Univ_Apr2017_1
>
> The query would provide data that could be curated / vetted / updated on
> Wikidata to populate the Listeria table on the Boston 1 page.
>
> Thanks in advance for any help with this.
>
> - Erika
>
> *Erika Herzog*
> Wikipedia *User:BrillLyle *
>
> ___
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata