query-6ed0dc4cef843628d79919ef8dfed299
le biblioteche in E-R con coordinate su Wikidata, di cui quelle aderenti al NILDE in altro colore (mappa) ) Query Servicein corso (vorrei più valori per 3 tipi di entità dei Cartigli? ES; *
Use at
- https://query.wikidata.org/sparql
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#>
#mappa dei Cartigli di Bologna
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?comuneLabel ?itemcoord ?layer1 ?layer2 ?layer3 WHERE {
{?item wdt:P31/wdt:P279* wd:Q811979} UNION {?item wdt:P31 wd:Q1437299 .} UNION {?item wdt:P31 wd:Q12284 .} UNION {?item wdt:P31 wd:Q22746 .} UNION {?item wdt:P31 wd:Q1107656 .}
?item p:P9327 ?statement0.
?statement0 (ps:P9327) _:anyValueP9327.
?item wdt:P131 ?comune .
?comune wdt:P625 ?comunecoord .
?item wdt:P625 ?itemcoord .
OPTIONAL { ?item wdt:P31/wdt:P279* wd:Q1437299 . BIND("CANALI" as ?layer2) } .
OPTIONAL { ?item wdt:P31/wdt:P279* wd:Q12284 . BIND("CANALI" as ?layer2) } .
OPTIONAL { ?item wdt:P31/wdt:P279* wd:Q22746 . BIND("GIARDINI PUBBLICI" as ?layer3) } .
OPTIONAL { ?item wdt:P31/wdt:P279* wd:Q1107656 . BIND("GIARDINI PUBBLICI" as ?layer3) } .
OPTIONAL { ?item wdt:P31/wdt:P279* wd:Q41176 . BIND("EDIFICI STORICI" as ?layer1) } .
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")
v1("?item"):::projected
v5("?itemcoord"):::projected
v8("?layer1"):::projected
v7("?layer2"):::projected
v8("?layer3"):::projected
v2("?statement0")
a2((" "))
a1((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
c3(["wd:Q811979"]):::iri
c7(["wd:Q1107656"]):::iri
c12(["wd:Q41176"]):::iri
c4(["wd:Q1437299"]):::iri
c6(["wd:Q22746"]):::iri
c14(["bd:serviceParam"]):::iri
c5(["wd:Q12284"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en, it, fr, es, de"]):::literal
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;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c7
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c6
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
end
union0r <== or ==> union0l
end
v1 --"p:P9327"--> v2
v2 --"p:statement/P9327"--> a2
v1 --"p:direct/P131"--> v3
v3 --"p:direct/P625"--> v4
v1 --"p:direct/P625"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> a3
a3 --"p:direct/P279"--> c4
bind0[/"'CANALI'"/]
bind0 --as--o v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> a4
a4 --"p:direct/P279"--> c5
bind1[/"'CANALI'"/]
bind1 --as--o v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> a5
a5 --"p:direct/P279"--> c6
bind2[/"'GIARDINI PUBBLICI'"/]
bind2 --as--o v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> a6
a6 --"p:direct/P279"--> c7
bind3[/"'GIARDINI PUBBLICI'"/]
bind3 --as--o v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> a7
a7 --"p:direct/P279"--> c12
bind4[/"'EDIFICI STORICI'"/]
bind4 --as--o v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end