query-1950d0e8985714ade420d41f24e59af1

rq turtle/ttl

Map of of baths with Eionet bathing Water ID (P9616)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Eionet bathidentifier in Wikidata 
#defaultView:Map{"hide":["?coord","?layer"], "layer": "?countryLabel"}
SELECT ?node (REPLACE(STR(?node), ".*Q", "Q") AS ?qid) ?nodeLabel ?nodeDescription ?BathId   ?countryLabel ?www
(SAMPLE(?coord) AS ?coord) 
(SAMPLE(?img) AS ?img)  WHERE {
   ?node wdt:P9616 ?BathId.
   OPTIONAL {?node wdt:P18 ?img}
   OPTIONAL {?node wdt:P17 ?country}
   OPTIONAL {?node wdt:P856 ?www}
   ?node wdt:P625 ?coord
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en,sv". }
} Group By ?node ?nodeLabel ?nodeDescription ?BathId   ?countryLabel ?www
order by ?countryLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?BathId"):::projected v9("?coord"):::projected v5("?country") v1("?countryLabel"):::projected v9("?img"):::projected v2("?node"):::projected v8("?qid") v6("?www"):::projected c7(["bd:serviceParam"]):::iri c9(["en,sv"]):::literal v2 --"wdt:P9616"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v9 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P17".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P856".-> v6 end v2 --"wdt:P625"--> v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind2[/"replace(str(?node),'.*Q','Q')"/] v2 --o bind2 bind2 --as--o v8 bind3[/"sample(?coord)"/] v9 --o bind3 bind3 --as--o v9 bind4[/"sample(?img)"/] v9 --o bind4 bind4 --as--o v9