Commit 55bbe5f1 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Update municipality table.

parent 6196e898
...@@ -30,11 +30,11 @@ https://query.wikidata.org/ ...@@ -30,11 +30,11 @@ https://query.wikidata.org/
SELECT ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT (GROUP_CONCAT(DISTINCT ?coordinates; SEPARATOR=",") as ?groupedCoordinates) SELECT ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT (GROUP_CONCAT(DISTINCT ?coordinates; SEPARATOR=",") as ?groupedCoordinates)
WHERE WHERE
{ {
?item wdt:P31 wd:Q70208. ?item wdt:P31 wd:Q70208. # swiss municipalities
?item wdt:P281 ?postalCode . ?item wdt:P281 ?postalCode .
?item wdt:P625 ?coordinates . ?item wdt:P625 ?coordinates .
?item wdt:P131 ?adminUnit . ?item wdt:P131 ?adminUnit .
?adminUnit wdt:P31 wd:Q23058 . ?adminUnit wdt:P31 wd:Q23058 . # adminUnit is canton of switzerland
?item rdfs:label ?labelDE . ?item rdfs:label ?labelDE .
FILTER(LANG(?labelDE) = "de") FILTER(LANG(?labelDE) = "de")
...@@ -43,7 +43,10 @@ WHERE ...@@ -43,7 +43,10 @@ WHERE
FILTER(LANG(?labelFR) = "fr") FILTER(LANG(?labelFR) = "fr")
?item rdfs:label ?labelIT . ?item rdfs:label ?labelIT .
FILTER(LANG(?labelIT) = "fr") FILTER(LANG(?labelIT) = "it")
MINUS {
?item wdt:P31 wd:Q685309 # removes former municipalities
}
} }
GROUP BY ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT GROUP BY ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment