query-a0bee774742278a9d6154d83cf66459f
Map of all places related to persons with layers by property of the place as separate layers. I was able to bring all this places on the map, but I didn't figure out how to divide them into separate layers with different colours. (P937)work location , (P551)residence , (P20)place of death combined with other places like Birth places of German poetsI tried to get a map like
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide": ["?coord"]}
SELECT DISTINCT ?subj ?subjLabel ?dob ?birthPlace ?birthPlaceLabel ?dod ?deathPlace ?deathPlaceLabel ?coord WHERE {
?subj ((wdt:P19|wdt:P20|wdt:P551|wdt:P1321|wdt:P937)/(wdt:P131*)) wd:Q11943.
OPTIONAL {
?subj wdt:P19 ?birthPlace.
?birthPlace wdt:P625 ?coord.
}
OPTIONAL {
?subj wdt:P20 ?deathPlace.
?deathPlace wdt:P625 ?coord.
}
OPTIONAL { ?subj wdt:P569 ?dob. }
OPTIONAL { ?subj wdt:P570 ?dod. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?birthPlace"):::projected
v3("?coord"):::projected
v4("?deathPlace"):::projected
v5("?dob"):::projected
v6("?dod"):::projected
v1("?subj"):::projected
a1((" "))
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q11943"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P937"--> a1
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1321"--> a1
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P551"--> a1
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P20"--> a1
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P19"--> a1
end
union0r <== or ==> union0l
end
a1 --"wdt:P131"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v2
v2 --"wdt:P625"--> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P20".-> v4
v4 --"wdt:P625"--> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P570".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end