query-ef1a149fb5430161f43884c224131024

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#>
#Biblioteche in Emilia-Romagna e facenti parte della rete NILDE
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?comuneLabel ?coord ?layer WHERE {
  {?item wdt:P31/wdt:P279* wd:Q7075} UNION {?item wdt:P31 wd:Q856584 .}
   ?item (wdt:P131)* wd:Q1263 .
   OPTIONAL { ?item wdt:P463 wd:Q21272726 . BIND("NILDE" as ?layer) } .
   ?item wdt:P131 ?comune .
   ?comune wdt:P625 ?comunecoord .
  OPTIONAL { ?item wdt:P625 ?itemcoord . }
  BIND(IF(BOUND(?itemcoord),?itemcoord,?comunecoord) AS ?coord)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, it, fr, es, de". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?comune") v4("?comunecoord") v6("?coord"):::projected v1("?item"):::projected v5("?itemcoord") v2("?layer"):::projected a1((" ")) c8(["wd:Q21272726"]):::iri c4(["wd:Q856584"]):::iri c3(["wd:Q7075"]):::iri c11(["bd:serviceParam"]):::iri c6(["wd:Q1263"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en, it, fr, es, de"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 end union0r <== or ==> union0l end v1 --"wdt:P131"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P463".-> c8 bind0[/"'NILDE'"/] bind0 --as--o v2 end v1 --"wdt:P131"--> v3 v3 --"wdt:P625"--> v4 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v5 end bind1[/"if(bound(?itemcoord),?itemcoord,?comunecoord)"/] v5 --o bind1 v4 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end