query-a461ee6e3072f51e580670c48878b71c

rq turtle/ttl

Alas, coloring per country in different layer colors does not work. The previous try to accomplish my request was:

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 ?item ?itemLabel ?coord ?layerLabel (count(?item) as ?countries) {
  VALUES ?country { wd:Q38 wd:Q40 wd:Q39 wd:Q183 wd:Q215}
  ?item wdt:P31 wd:Q8502 .
  ?item wdt:P17 ?country . BIND(?country AS ?layer) 
  ?item wdt:P625 ?coord . 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?coord ?layerLabel
HAVING (?countries = 1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coord"):::projected v6("?countries") v2("?country") v3("?item"):::projected v4("?layer") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q8502"]):::iri f0[["?countries = '1^^xsd:integer'"]] f0 --> v6 bind1[/VALUES ?country/] bind1-->v2 bind10(["wd:Q38"]) bind10 --> bind1 bind11(["wd:Q40"]) bind11 --> bind1 bind12(["wd:Q39"]) bind12 --> bind1 bind13(["wd:Q183"]) bind13 --> bind1 bind14(["wd:Q215"]) bind14 --> bind1 v3 --"wdt:P31"--> c3 v3 --"wdt:P17"--> v2 bind2[/"?country"/] v2 --o bind2 bind2 --as--o v4 v3 --"wdt:P625"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind4[/"count(?item)"/] v3 --o bind4 bind4 --as--o v6