Skip to content

Commit

Permalink
Add Switzerland
Browse files Browse the repository at this point in the history
I removed the Qids from the "unconfirmed"  authorities/agencies (no official source) and I added the Swiss municipalities as well.
  • Loading branch information
RVA2869 committed Jun 7, 2024
1 parent cf6807b commit 4a3e35a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions queries/countries.rq
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ WHERE {
(wd:Q189 'Iceland' 'iceland' 'Current content includes ministries, courts and municipalities.' '')
(wd:Q233 'Malta' 'malta' 'Current content includes ministries, regions and local councils.' '')
(wd:Q1028 'Morocco' 'morocco' 'Current content includes ministries, embassies, regions, provinces and prefectures.' '')
(wd:Q39 'Switzerland' 'switzerland' 'Current content includes federal ministries, cantons and municipalities.')

(wd:Q145 'United Kingdom' 'united-kingdom' 'Current content includes ministerial departments.' 'Scotland|scotland')
(wd:Q22 'Scotland' 'united-kingdom/scotland' 'Executive agencies, local authorities, NHS boards, NDPBs, courts, public corporations, tribunals, parole boards, Queen\'s printer, non-ministerial government departments, commissioners, ombudsmen and Health and social care partnerships.' '')
Expand Down
31 changes: 31 additions & 0 deletions queries/generators/switzerland.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# expected_result_count: 2164
SELECT DISTINCT
?qid
?orgLabel
?orgDescription
?type
?typeLabel
?country
WHERE {
BIND(wd:Q39 AS ?country)

VALUES ?type {
wd:Q113015553 # federal ministry of switzerland (7)
wd:Q23058 # canton of switzerland (26)
wd:Q70208 # municipality of Switzerland (2131)
}
?org wdt:P31 ?type .

?org wdt:P17 ?country .

MINUS { ?org wdt:P576 [] }
MINUS { ?org wdt:P1366 [] }
MINUS { ?org wdt:P582 [] }
MINUS { ?org wdt:P571 ?date . FILTER (DATATYPE(?date) = xsd:dateTime && ?date > now()) }


BIND(REPLACE(STR(?org), "http://www.wikidata.org/entity/", "") AS ?qid)

SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de" }
}
ORDER BY ?type ?orgLabel

0 comments on commit 4a3e35a

Please sign in to comment.