Fetching English location terms for art repositories and museums

50 views
Skip to first unread message

Maddie Boucher

unread,
Sep 14, 2016, 1:16:57 PM9/14/16
to Getty Vocabularies as Linked Open Data
Hi,

I'm a total novice with SPARQL querying. I'm attempting to adapt this sample query to fetch Art Repositories by state in order to get a list of all art repositories, worldwide, with their English preferred terms for city, state/province, and nation in separate fields. I can get all the repository names and ulan identifiers but location is still evading me, the best I've been able to do is to get latitude and longitude coordinates for each.

Would appreciate some assistance with adapting...

?location foaf:focus ?place;
...
?location gvp:prefLabelGVP [xl:literalForm ?loc_name]  

...to achieve this.


Thanks in advance,

Maddie

Vladimir Alexiev

unread,
Sep 18, 2016, 4:16:43 AM9/18/16
to Maddie Boucher, Getty Vocabularies as Linked Open Data
> with city, state/province, and nation

- Nation: there’s a section that explores queries for countries. Use that to pick a placeType value aat:??? that matches most closely what you need. Then modify the query there to look for that type.
(I’m writing without internet access, so I’m not sure about the name of the placeType property).

- state/province is a US/Canada term, and doesn’t apply to all countries.
You’d have to explore across countries to see what placeTypes are used to identify their top-level administrative divisions.

- Similarly, City probably matches several different AAT types.
AFAIK there's a type called “inhabited place” and most cities have it.
But of course, some museums are not located in cities.
So I think your best bet is to take the immediate location of the repository, without restricting what the location type is.

If you can use the complete hierarchy of places that the repository belongs to,
just use gvp:parentString of the immediate location, and save yourself a lot of trouble.

Cheers! Vladimir

Vladimir Alexiev

unread,
Oct 10, 2016, 4:25:29 AM10/10/16
to Getty Vocabularies as Linked Open Data, madelein...@gmail.com

This query returns the immediate ?location, its ?ancestor_places, and two specific points from the ancestor chain: ?country and ?continent

select ?x ?name ?bio ?location ?country ?continent ?loc_name ?country_name ?continent_name ?ancestor_places {
  filter (?type in (aat:300312243, aat:300312242, aat:300312241, aat:300312281, aat:300264595))
  ?x gvp:agentTypePreferred|(gvp:agentTypePreferred/gvp:broaderExtended) ?type.
  ?x gvp:prefLabelGVP/xl:literalForm ?name;
     foaf:focus [
       bio:event [dct:type [rdfs:label "location (activity or state)"@en]; schema:location ?place];
       gvp:biographyPreferred [schema:description ?bio]].
  ?location foaf:focus ?place.
  ?location gvp:prefLabelGVP [xl:literalForm ?loc_name]; gvp:parentString ?ancestor_places.
  ?location gvp:broaderPreferredExtended ?country.
  ?country gvp:broaderPreferred ?continent; gvp:prefLabelGVP [xl:literalForm ?country_name].
  ?continent gvp:broaderPreferred [rdfs:label "World"@en]; gvp:prefLabelGVP [xl:literalForm ?continent_name]

Seems to work pretty well

Reply all
Reply to author
Forward
0 new messages