query-177fab9eb2dff0fd46bdd2dd8a840b7d
Query #10: Visualize lakes within Nevada counties
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?item ?itemPrefLabel ?coor ?layerLabel
WHERE
{
{
VALUES ?o { wd:Q108403 wd:Q111220 wd:Q835104 wd:Q495398 wd:Q484340 wd:Q484381 wd:Q203022 wd:Q7103481 wd:Q484418 wd:Q484342 wd:Q484335 wd:Q495376 wd:Q495349 wd:Q484431 wd:Q484349 wd:Q484401 wd:Q484398 } # Counties of Nevada, United States
?item wdt:P31 wd:Q23397 ; # instance of lake
rdfs:label ?itemPrefLabel ;
?range ?o ;
wdt:P625 ?coor ;
wdt:P131 ?location .
BIND(?o AS ?layer)
FILTER (LANG(?itemPrefLabel) = "en")
FILTER(?location IN (wd:Q108403, wd:Q111220, wd:Q835104, wd:Q495398, wd:Q484340, wd:Q484381, wd:Q203022, wd:Q7103481, wd:Q484418, wd:Q484342, wd:Q484335, wd:Q495376, wd:Q495349, wd:Q484431, wd:Q484349, wd:Q484401, wd:Q484398 )) # Filter out 'administrative territorial entities' values NOT in this list
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER By (?layerLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?coor"):::projected
v5("?item"):::projected
v3("?itemPrefLabel"):::projected
v8("?layer")
v1("?layerLabel"):::projected
v2("?location")
v4("?o")
v6("?range")
c25(["bd:serviceParam"]):::iri
c20(["wd:Q23397"]):::iri
c18(["en"]):::literal
list0c8(["wd:Q7103481"]):::iri
list0c7(["wd:Q203022"]):::iri
list0c1(["wd:Q108403"]):::iri
list0c4(["wd:Q495398"]):::iri
list0c12(["wd:Q495376"]):::iri
list0c15(["wd:Q484349"]):::iri
list0c11(["wd:Q484335"]):::iri
list0c16(["wd:Q484401"]):::iri
list0c9(["wd:Q484418"]):::iri
list0c3(["wd:Q835104"]):::iri
list0c5(["wd:Q484340"]):::iri
list0c2(["wd:Q111220"]):::iri
list0c14(["wd:Q484431"]):::iri
list0c17(["wd:Q484398"]):::iri
list0c10(["wd:Q484342"]):::iri
list0c13(["wd:Q495349"]):::iri
list0c6(["wd:Q484381"]):::iri
list0c1 --o f0
list0c2 --o f0
list0c3 --o f0
list0c4 --o f0
list0c5 --o f0
list0c6 --o f0
list0c7 --o f0
list0c8 --o f0
list0c9 --o f0
list0c10 --o f0
list0c11 --o f0
list0c12 --o f0
list0c13 --o f0
list0c14 --o f0
list0c15 --o f0
list0c16 --o f0
list0c17 --o f0
f0[[" in "]]
f0 --> v2
f1[["?itemPrefLabel = 'en'"]]
f1 --> v3
bind2[/VALUES ?o/]
bind2-->v4
bind20(["wd:Q108403"])
bind20 --> bind2
bind21(["wd:Q111220"])
bind21 --> bind2
bind22(["wd:Q835104"])
bind22 --> bind2
bind23(["wd:Q495398"])
bind23 --> bind2
bind24(["wd:Q484340"])
bind24 --> bind2
bind25(["wd:Q484381"])
bind25 --> bind2
bind26(["wd:Q203022"])
bind26 --> bind2
bind27(["wd:Q7103481"])
bind27 --> bind2
bind28(["wd:Q484418"])
bind28 --> bind2
bind29(["wd:Q484342"])
bind29 --> bind2
bind210(["wd:Q484335"])
bind210 --> bind2
bind211(["wd:Q495376"])
bind211 --> bind2
bind212(["wd:Q495349"])
bind212 --> bind2
bind213(["wd:Q484431"])
bind213 --> bind2
bind214(["wd:Q484349"])
bind214 --> bind2
bind215(["wd:Q484401"])
bind215 --> bind2
bind216(["wd:Q484398"])
bind216 --> bind2
v5 --"wdt:P31"--> c20
v5 --"rdfs:label"--> v3
v5 -->v6--> v4
v5 --"wdt:P625"--> v7
v5 --"wdt:P131"--> v2
bind3[/"?o"/]
v4 --o bind3
bind3 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c25 --"wikibase:language"--> c18
end