query-547b690070b29bd6a1247fade4575131

rq turtle/ttl

Libraries in Australia

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#>
#defaultView:Map
SELECT ?library ?libraryLabel ?libraryDescription ?coordinate_location ?image ?website ?layer WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  { ?library wdt:P31 wd:Q7075 }
    UNION { ?library wdt:P31 wd:Q28564 }
    UNION { ?library wdt:P31 wd:Q856234 } .
  ?library wdt:P17 wd:Q408 .
  OPTIONAL { ?library wdt:P625 ?coordinate_location }
  OPTIONAL { ?library wdt:P18 ?image }
  BIND( IF( BOUND(?image), "", "Image needed!" ) AS ?layer )
  OPTIONAL { ?library wdt:P856 ?website }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?coordinate_location"):::projected v3("?image"):::projected v4("?layer"):::projected v1("?library"):::projected v5("?website"):::projected c8(["wd:Q856234"]):::iri c7(["wd:Q28564"]):::iri c10(["wd:Q408"]):::iri c6(["wd:Q7075"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 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; v1 --"wdt:P31"--> c8 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c7 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c6 end union0r <== or ==> union0l end v1 --"wdt:P17"--> c10 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end bind0[/"if(bound(?image),'','Image needed!')"/] v3 --o bind0 bind0 --as--o v4 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P856".-> v5 end