A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/award_locations-of-recipients.sparql
Award aspect: locations of recipients
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:Map
PREFIX target: <http://www.wikidata.org/entity/Q44585>
SELECT DISTINCT ?recipient ?recipientLabel ?image ?item ?itemLabel ?geo ?layer
WITH {
SELECT DISTINCT ?recipient ?image ?item ?geo (?property_item_label AS ?layer) WHERE {
?recipient wdt:P166 target: .
?recipient ?property ?item .
?item wdt:P625 ?geo .
?property_item wikibase:directClaim ?property .
?property_item rdfs:label ?property_item_label . FILTER (LANG(?property_item_label) = 'en')
OPTIONAL { ?item wdt:P18 ?image . }
}
} AS %result
WHERE {
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
}
graph TD