Skip to content

Commit

Permalink
Merge pull request #398 from RVA2869/Add-Switzerland
Browse files Browse the repository at this point in the history
馃嚚馃嚟 Add Switzerland
  • Loading branch information
Ainali committed Jun 22, 2024
2 parents cf6807b + fae9e3e commit ebcbc07
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions jargon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ st
Sverige
svg
sweden
switzerland
synergize
Temaki
th
Expand Down
1 change: 1 addition & 0 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ intendedAudience:
- se
- ua
- gb
- ch

scope:
- government
Expand Down
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:https://www.wikidata.org/entity/", "") AS ?qid)

SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de" }
}
ORDER BY ?type ?orgLabel
3 changes: 3 additions & 0 deletions views.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ views:
- output: "morocco/{{qid}}/index.html"
query: "generators/morocco.rq"
template: "org.html"
- output: "switzerland/{{qid}}/index.html"
query: "generators/switzerland.rq"
template: "org.html"

- output: "united-kingdom/{{qid}}/index.html"
query: "generators/united-kingdom.rq"
Expand Down

0 comments on commit ebcbc07

Please sign in to comment.