query-c2b1b0a97bcc7912b58612d7f633a938

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel_EN ?itemLabel_FR WHERE
{
   {
  SELECT DISTINCT ?item WHERE 
{

  {?item wdt:P131* wd:Q90 . }        #located in the Paris area
  UNION
  {wd:Q90 wdt:P625 ?parisLoc .    
  SERVICE wikibase:around {          # or within 20km of Paris's coordinate
      ?item wdt:P625 ?location . 
      bd:serviceParam wikibase:center ?parisLoc . 
      bd:serviceParam wikibase:radius "20" . 
    } 
  }
  ?item wdt:P31/wdt:P279 wd:Q12280.  #is some sort of bridge
  }
}                                     #get labels, if they exist, in EN and FR
  OPTIONAL {?item rdfs:label ?itemLabel_EN . filter(lang(?itemLabel_EN)="en") }
  OPTIONAL {?item rdfs:label ?itemLabel_FR . filter(lang(?itemLabel_FR)="fr") }  
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?itemLabel_EN"):::projected v1("?itemLabel_FR"):::projected v5("?location") v4("?parisLoc") a1((" ")) c4(["wd:Q90"]):::iri c13(["wd:Q12280"]):::iri c7(["bd:serviceParam"]):::iri c10(["20"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; c4 --"wdt:P625"--> v4 subgraph s1["http://wikiba.se/ontology#around"] style s1 stroke-width:4px; v3 --"wdt:P625"--> v5 c7 --"wikibase:center"--> v4 c7 --"wikibase:radius"--> c10 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P131"--> c4 end union0r <== or ==> union0l end v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c13 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v1 end