query-c664c575573a4c4e6ca23609c3c4db90

rq turtle/ttl

Different colors on mapHi all! Starting from the following query

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#>
#Biblioteche, musei e chiese a Roma
#defaultView:Map
SELECT DISTINCT ?luogo ?luogoLabel ?coordinate ?layer
WHERE {
   BIND(wd:Q7075 AS ?biblioteca).
   BIND(wd:Q33506 AS ?museo).
   BIND(wd:Q16970 AS ?chiesa).
  ?luogo wdt:P131 wd:Q220 .
  OPTIONAL { ?luogo wdt:P625 ?coordinate . }
  { ?luogo wdt:P31/wdt:P279* ?biblioteca . }
  UNION
  { ?luogo wdt:P31/wdt:P279* ?museo . }
  UNION
  { ?luogo wdt:P31/wdt:P279* ?chiesa . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?biblioteca") v3("?chiesa") v5("?coordinate"):::projected v4("?luogo"):::projected v2("?museo") a1((" ")) a2((" ")) a3((" ")) c7(["bd:serviceParam"]):::iri c9(["it,en"]):::literal c2(["wd:Q220"]):::iri bind0[/"'wd:Q7075'"/] bind0 --as--o v1 bind1[/"'wd:Q33506'"/] bind1 --as--o v2 bind2[/"'wd:Q16970'"/] bind2 --as--o v3 v4 --"wdt:P131"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P625".-> v5 end subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P31"--> a3 a3 --"wdt:P279"--> v3 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P31"--> a2 a2 --"wdt:P279"--> v2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v1 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end