query-381884943a9e48d3495fc9a6979cbb5b

rq turtle/ttl

TODO

Use at

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#>
#Cities within 30km of New York
#defaultView:Map
SELECT ?place ?placeLabel ?location
WHERE
{
  # New York coordinates
  wd:Q60 wdt:P625 ?NYLoc . 
  SERVICE wikibase:around { 
      ?place wdt:P625 ?location . 
      bd:serviceParam wikibase:center ?NYLoc . 
      bd:serviceParam wikibase:radius "30" . 
  } 
  # Is a city
  ?place wdt:P31 wd:Q515 .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr" . 
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?NYLoc") v3("?location"):::projected v2("?place"):::projected c4(["bd:serviceParam"]):::iri c1(["wd:Q60"]):::iri c9(["wd:Q515"]):::iri c12(["fr"]):::literal c7(["30"]):::literal c1 --"wdt:P625"--> v1 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v2 --"wdt:P625"--> v3 c4 --"wikibase:center"--> v1 c4 --"wikibase:radius"--> c7 end v2 --"wdt:P31"--> c9 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"wikibase:language"--> c12 end