diff --git a/ParlinfoRidings.xlsx b/ParlinfoRidings.xlsx new file mode 100644 index 00000000..c9b25126 Binary files /dev/null and b/ParlinfoRidings.xlsx differ diff --git a/identifiers/country-ca.csv b/identifiers/country-ca.csv index e54d1cc7..85dd181f 100644 --- a/identifiers/country-ca.csv +++ b/identifiers/country-ca.csv @@ -12186,7 +12186,7 @@ ocd-division/country:ca/territory:nt/ed:inuvik_boot_lake,Inuvik Boot Lake,,,,,,, ocd-division/country:ca/territory:nt/ed:inuvik_twin_lakes,Inuvik Twin Lakes,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:kam_lake,Kam Lake,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:mackenzie,Mackenzie,,1908-09-16,,,,,,,,,,,,1904-09-20 -ocd-division/country:ca/territory:nt/ed:mackenzie-delta,Mackenzie-Delta,,,,,,,,,,,,,, +ocd-division/country:ca/territory:nt/ed:mackenzie_delta,Mackenzie Delta,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:mackenzie_river,Mackenzie River,,1962-04-07,,,,,,,,,,,,1953-06-13 ocd-division/country:ca/territory:nt/ed:monfwi,Monfwi,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:nahendeh,Nahendeh,,,,,,,,,,,,,, @@ -12201,7 +12201,7 @@ ocd-division/country:ca/territory:nt/ed:sahtu,Sahtu,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:saskatchewan_provisional_district,Saskatchewan (Provisional District),,1908-09-16,,,,,,,,,,,,1886-06-02 ocd-division/country:ca/territory:nt/ed:strathcona,Strathcona,,1908-09-16,,,,,,,,,,,,1904-09-20 ocd-division/country:ca/territory:nt/ed:thebacha,Thebacha,,,,,,,,,,,,,, -ocd-division/country:ca/territory:nt/ed:tu_nedhé_-_wiilideh,Tu Nedhé - Wiilideh,,,,,,,,,,,,,, +ocd-division/country:ca/territory:nt/ed:tu_nedhé-wiilideh,Tu Nedhé-Wiilideh,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:western_arctic,Western Arctic,,2015-08-01,,,,,,,,,,,,1979-03-26 ocd-division/country:ca/territory:nt/ed:yellowknife_centre,Yellowknife Centre,,,,,,,,,,,,,, ocd-division/country:ca/territory:nt/ed:yellowknife_north,Yellowknife North,,,,,,,,,,,,,, diff --git a/identifiers/country-ca/territory-nt-electoral_districts.csv b/identifiers/country-ca/territory-nt-electoral_districts.csv index 1624d0d2..1f16a24b 100644 --- a/identifiers/country-ca/territory-nt-electoral_districts.csv +++ b/identifiers/country-ca/territory-nt-electoral_districts.csv @@ -7,14 +7,14 @@ ocd-division/country:ca/territory:nt/ed:hay_river_south,Hay River South ocd-division/country:ca/territory:nt/ed:inuvik_boot_lake,Inuvik Boot Lake ocd-division/country:ca/territory:nt/ed:inuvik_twin_lakes,Inuvik Twin Lakes ocd-division/country:ca/territory:nt/ed:kam_lake,Kam Lake -ocd-division/country:ca/territory:nt/ed:mackenzie-delta,Mackenzie-Delta +ocd-division/country:ca/territory:nt/ed:mackenzie_delta,Mackenzie Delta ocd-division/country:ca/territory:nt/ed:monfwi,Monfwi ocd-division/country:ca/territory:nt/ed:nahendeh,Nahendeh ocd-division/country:ca/territory:nt/ed:nunakput,Nunakput ocd-division/country:ca/territory:nt/ed:range_lake,Range Lake ocd-division/country:ca/territory:nt/ed:sahtu,Sahtu ocd-division/country:ca/territory:nt/ed:thebacha,Thebacha -ocd-division/country:ca/territory:nt/ed:tu_nedhé_-_wiilideh,Tu Nedhé - Wiilideh +ocd-division/country:ca/territory:nt/ed:tu_nedhé-wiilideh,Tu Nedhé-Wiilideh ocd-division/country:ca/territory:nt/ed:yellowknife_centre,Yellowknife Centre ocd-division/country:ca/territory:nt/ed:yellowknife_north,Yellowknife North ocd-division/country:ca/territory:nt/ed:yellowknife_south,Yellowknife South diff --git a/scripts/country-ca/Gemfile.lock b/scripts/country-ca/Gemfile.lock index 79020e7b..75bb3b2c 100644 --- a/scripts/country-ca/Gemfile.lock +++ b/scripts/country-ca/Gemfile.lock @@ -34,11 +34,11 @@ GEM net-http-digest_auth (1.4.1) net-http-persistent (4.0.2) connection_pool (~> 2.2) - nokogiri (1.15.6-arm64-darwin) + nokogiri (1.13.10-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.6-x86_64-darwin) + nokogiri (1.13.10-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.6-x86_64-linux) + nokogiri (1.13.10-x86_64-linux) racc (~> 1.4) public_suffix (5.0.1) racc (1.7.3) @@ -57,6 +57,7 @@ GEM PLATFORMS universal-darwin-22 + universal-darwin-23 x86_64-linux DEPENDENCIES diff --git a/scripts/country-ca/ca_nt_electoral_districts.rb b/scripts/country-ca/ca_nt_electoral_districts.rb index 18b04307..c5e9a5d8 100755 --- a/scripts/country-ca/ca_nt_electoral_districts.rb +++ b/scripts/country-ca/ca_nt_electoral_districts.rb @@ -5,13 +5,22 @@ # Scrapes Northwest Territories electoral district codes and names +# https://newsinteractives.cbc.ca/elections/northwest-territories/2023/results/ +# https://en.wikipedia.org/wiki/Category:Northwest_Territories_territorial_electoral_districts +REPLACEMENTS = { + "Mackenzie-Delta" => "Mackenzie Delta", + "Tu Nedhé - Wiilideh" => "Tu Nedhé-Wiilideh", +} + class NT < Runner def names ShapefileParser.new( - "http://represent.opennorth.ca.s3.amazonaws.com/data/nt_ed.zip", + "https://www.geomatics.gov.nt.ca/en/electoral-district-boundaries", "territory:nt/ed:", { - :id => "EDNWTF_ID", - :name => "ED", + :name => lambda { |record| + name = record.attributes["ED"].force_encoding("utf-8").encode("utf-8") + REPLACEMENTS.fetch(name, name) + }, } ).run end diff --git a/scripts/country-ca/run-all.sh b/scripts/country-ca/run-all.sh index c4a0cd70..714f94f9 100755 --- a/scripts/country-ca/run-all.sh +++ b/scripts/country-ca/run-all.sh @@ -23,10 +23,12 @@ $DIR/ca_bc_electoral_districts.rb names > $DIR/../../identifiers/country-ca # $DIR/ca_mb_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-mb-electoral_districts.csv echo 'ca_nb_electoral_districts' $DIR/ca_nb_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-nb-electoral_districts.csv -echo 'ca_ns_electoral_districts' -$DIR/ca_ns_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-ns-electoral_districts.csv echo 'ca_nl_electoral_districts' $DIR/ca_nl_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-nl-electoral_districts.csv +echo 'ca_ns_electoral_districts' +$DIR/ca_ns_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-ns-electoral_districts.csv +echo 'ca_nt_electoral_districts' +$DIR/ca_nt_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-nt-electoral_districts.csv echo 'ca_on_electoral_districts' $DIR/ca_on_electoral_districts.rb names > $DIR/../../identifiers/country-ca/province-on-electoral_districts.csv echo 'ca_pe_electoral_districts'