query-5ed6b87f4fcfb0910ce493b98aaeff53
Map of all NYPL Locations
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Map of all NYPL Locations
#defaultView:Map
SELECT ?item ?itemLabel ?image ?layer ?layerLabel ?website ?geo {
?item wdt:P31 wd:Q11396180;
p:P31 [ pq:P642 wd:Q219555 ];
wdt:P625 ?geo .
OPTIONAL { ?item wdt:P361 ?layer.
?layer wdt:P361* wd:Q219555. }
OPTIONAL { ?item wdt:P18 ?image. }
OPTIONAL { ?item wdt:P856 ?website. }
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("?geo"):::projected
v4("?image"):::projected
v1("?item"):::projected
v3("?layer"):::projected
v5("?website"):::projected
a1((" "))
c2(["wd:Q11396180"]):::iri
c11(["bd:serviceParam"]):::iri
c4(["wd:Q219555"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P31"--> c2
a1 --"p:qualifier/P642"--> c4
v1 --"p:P31"--> a1
v1 --"p:direct/P625"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P361".-> v3
v3 --"p:direct/P361"--> c4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P856".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end