query-eca06e58b3cd1e52e2deff6f2c71f63a

rq turtle/ttl

Hospitals in Oxfordshire, displayed on mapHi, I created this using the query builder: get a list of hospitals, but am not able to get the results to display on a map.

Use at

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Map of hospitals
#added 2017-08
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
  {
    SELECT DISTINCT ?item WHERE {
      ?item p:P31 ?statement0.
      ?statement0 (ps:P31/(wdt:P279*)) wd:Q16917.
      ?item p:P131 ?statement1.
      ?statement1 (ps:P131/(wdt:P131*)) wd:Q23169.
    }
    LIMIT 5
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?statement0") v3("?statement1") a1((" ")) a2((" ")) c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;"]):::literal c8(["wd:Q16917"]):::iri c12(["wd:Q23169"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c8 v1 --"p:P131"--> v3 v3 --"p:statement/P131"--> a2 a2 --"p:direct/P131"--> c12