query-87b8c785b37f22bd31ec495844a6e774
Query for placesTo celebrate the nearly complete connection of this encyclopedia, here is a query showing on a map all the places pertinent to the encyclopedia, so all places having an article in it and all the birthplaces and deathplaces of people having an article in it:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?coord ?birthplace ?birthplaceLabel ?birthcoord ?deathplace ?deathplaceLabel ?deathcoord ?layer
(URI(CONCAT("https://eeo.aau.at/eeo.aau.at/index",?eeo,".html")) AS ?eeoUrl)
WHERE {
?item wdt:P9498 ?eeo .
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P19 ?birthplace . ?birthplace wdt:P625 ?birthcoord . }
OPTIONAL { ?item wdt:P20 ?deathplace . ?deathplace wdt:P625 ?deathcoord . }
BIND(IF(BOUND(?coord),"place","birthplace or deathplace") AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?birthcoord"):::projected
v4("?birthplace"):::projected
v3("?coord"):::projected
v7("?deathcoord"):::projected
v6("?deathplace"):::projected
v2("?eeo"):::projected
v9("?eeoUrl")
v1("?item"):::projected
v8("?layer"):::projected
c6(["bd:serviceParam"]):::iri
c8(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal
v1 --"wdt:P9498"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v4
v4 --"wdt:P625"--> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P20".-> v6
v6 --"wdt:P625"--> v7
end
bind0[/"if(bound(?coord),'place','birthplace or deathplace')"/]
v3 --o bind0
bind0 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"concat('https://eeo.aau.at/eeo.aau.at/index',?eeo,'.html')"/]
v2 --o bind1
bind1 --as--o v9