query-46ed713f0e7c9159bb21778a79b8c99a
Places visited by the Sibthorp/ Bauer expeditionUsed to make places.json
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT (SUBSTR(STR(?loc),32) AS ?q) ?locLabel (SAMPLE(?coords) AS ?latlong) (MONTH(?start) AS ?start_m) (YEAR(?start) AS ?start_y) (MONTH(?end) AS ?end_m) (YEAR(?end) AS ?end_y) WHERE {
wd:Q52496052 p:P276 ?s.
?s ps:P276 ?loc
OPTIONAL {?s pq:P585 ?point}
OPTIONAL {?s pq:P580 ?startpoint}
BIND(COALESCE(?startpoint, ?point) AS ?start)
OPTIONAL {?s pq:P582 ?end}
?loc wdt:P625 ?coords.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?loc ?locLabel ?start ?end
ORDER BY ?start_y ?start_m ?end_y ?end_m
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?coords"):::projected
v10("?end"):::projected
v14("?end_m")
v14("?end_y")
v13("?latlong")
v6("?loc"):::projected
v7("?point")
v12("?q")
v5("?s")
v9("?start"):::projected
v14("?start_m")
v14("?start_y")
v8("?startpoint")
c9(["bd:serviceParam"]):::iri
c1(["wd:Q52496052"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c1 --"p:P276"--> v5
v5 --"p:statement/P276"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P585".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P580".-> v8
end
bind0[/"?startpoint?point"/]
v8 --o bind0
v7 --o bind0
bind0 --as--o v9
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P582".-> v10
end
v6 --"p:direct/P625"--> v11
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"substring(str(?loc),'32^^xsd:integer')"/]
v6 --o bind2
bind2 --as--o v12
bind3[/"sample(?coords)"/]
v11 --o bind3
bind3 --as--o v13
bind4[/"month-from-dateTime(?start)"/]
v9 --o bind4
bind4 --as--o v14
bind5[/"year-from-dateTime(?start)"/]
v9 --o bind5
bind5 --as--o v14
bind6[/"month-from-dateTime(?end)"/]
v10 --o bind6
bind6 --as--o v14
bind7[/"year-from-dateTime(?end)"/]
v10 --o bind7
bind7 --as--o v14