Skip to content

Commit

Permalink
323 canada fed rename (#327)
Browse files Browse the repository at this point in the history
* finish TODOs

* fix aliases

* missing district name is captured in Victoria District

* update README
  • Loading branch information
evannjw authored Jan 28, 2024
1 parent 823abde commit 2939706
Show file tree
Hide file tree
Showing 9 changed files with 12,825 additions and 10,736 deletions.
22,309 changes: 11,890 additions & 10,419 deletions identifiers/country-ca.csv

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions identifiers/country-ca/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Federal Electoral Districts

Canadian federal electoral districts are represented by the following naming policy:
* All current divisions are given an ID, based on their name.
* All divisions that are abolished according to the Library of Parliament are given an ID, based on their name.
* If multiple current/abolished divisions have the same ID, later divisions are suffixed with the validFrom year.
* All divisions that were renamed according to the Library of Parliament are aliases (sameAs) to another ID.
* A province/territory:id pair is prefixed to the ed:id pair, since two provinces can contain the same district name.
* The most recent ID is the "canonical" ID. Previous renames are aliased to it.

Up until November 2022, Canadian federal electoral districts were represented with [federal electoral district codes](https://www.elections.ca/content.aspx?section=res&dir=cir/list&document=index338&lang=e) where the year in which the redistricting was completed would be appended to the file name (i.e. ca\_federal\_electoral\_districts-2013.csv).

To generate updated OCD ID files, run the script: scripts/country-ca/ca\_federal\_electoral\_districts.py (instructions found in file). The following files are generated by the script:
identifiers/country-ca/ca\_federal\_electoral\_districts-abolished.csv
identifiers/country-ca/ca\_federal\_electoral\_districts-aliases.csv
identifiers/country-ca/ca\_federal\_electoral\_districts-current.csv

To add aliases manually, append to identifiers/country-ca/aliases.csv
647 changes: 647 additions & 0 deletions identifiers/country-ca/aliases.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,53 @@ ocd-division/country:ca/territory:nt/ed:strathcona,Strathcona,1904-09-20,1908-09
ocd-division/country:ca/territory:nt/ed:western_arctic,Western Arctic,1979-03-26,2015-08-01
ocd-division/country:ca/territory:nt/ed:yukon-mackenzie_river,Yukon—Mackenzie River,1949-04-30,1953-06-12
ocd-division/country:ca/territory:yt/ed:yukon,Yukon,1902-01-01,1949-04-29
ocd-division/country:ca/province:ab/ed:calgary,Calgary,1908-09-17,1917-10-05
ocd-division/country:ca/province:ab/ed:east_calgary,East Calgary,1917-10-06,1925-09-04
ocd-division/country:ca/province:bc/ed:cariboo_district,Cariboo District,1871-05-16,1872-07-07
ocd-division/country:ca/province:bc/ed:victoria_district,Victoria District,1871-05-16,1872-07-07
ocd-division/country:ca/province:bc/ed:westminster_district,Westminster District,1917-10-06,1919-04-02
ocd-division/country:ca/province:bc/ed:yale_district,Yale District,1871-05-16,1872-07-07
ocd-division/country:ca/province:mb/ed:st._boniface,St. Boniface,1925-09-05,1997-04-26
ocd-division/country:ca/province:nl/ed:st._john~s_north,St. John's North,2004-05-23,2004-08-31
ocd-division/country:ca/province:nl/ed:st._john~s_south,St. John's South,2004-05-23,2004-08-31
ocd-division/country:ca/province:ns/ed:annapolis_valley-hants,Annapolis Valley—Hants,1979-03-26,1997-04-26
ocd-division/country:ca/province:ns/ed:cape_breton_north-victoria,Cape Breton North—Victoria,1925-09-05,1935-08-13
ocd-division/country:ca/province:ns/ed:digby_and_annapolis,Digby and Annapolis,1917-10-06,1925-09-04
ocd-division/country:ca/province:ns/ed:north_cape_breton_and_victoria,North Cape Breton and Victoria,1904-09-20,1925-09-04
ocd-division/country:ca/province:on/ed:bruce-grey-owen_sound-2000,Bruce—Grey—Owen Sound,2000-06-29,2004-05-22
ocd-division/country:ca/province:on/ed:essex-kent,Essex—Kent,1979-03-26,1997-04-26
ocd-division/country:ca/province:on/ed:hamilton-wentworth,Hamilton—Wentworth,1968-04-23,1997-04-26
ocd-division/country:ca/province:on/ed:lambton-kent-middlesex-1997,Lambton—Kent—Middlesex,1997-04-27,2004-05-22
ocd-division/country:ca/province:on/ed:lanark-carleton,Lanark—Carleton,1988-10-01,2004-05-22
ocd-division/country:ca/province:on/ed:lanark-frontenac-lennox_and_addington,Lanark—Frontenac—Lennox and Addington,2004-05-23,2015-08-01
ocd-division/country:ca/province:on/ed:markham-whitchurch-stouffville,Markham—Whitchurch—Stouffville,1989-12-29,1997-04-26
ocd-division/country:ca/province:on/ed:mississauga-erindale,Mississauga—Erindale,2004-05-23,2015-08-01
ocd-division/country:ca/province:on/ed:mississauga_east-cooksville-2004,Mississauga East—Cooksville,2004-05-23,2015-08-01
ocd-division/country:ca/province:on/ed:pickering-scarborough_east,Pickering—Scarborough East,2004-05-23,2015-08-01
ocd-division/country:ca/province:on/ed:st._paul~s,St. Paul's,1935-08-14,2015-08-01
ocd-division/country:ca/province:on/ed:windsor-lake_st._clair,Windsor—Lake St. Clair,1988-10-01,1989-12-28
ocd-division/country:ca/province:qc/ed:chicoutimi-le_fjord-2000,Chicoutimi—Le Fjord,2000-06-29,2015-08-01
ocd-division/country:ca/province:qc/ed:hochelaga-1867,Hochelaga,1867-08-06,1979-03-25
ocd-division/country:ca/province:qc/ed:la_prairie-1981,La Prairie,1981-01-17,1997-04-26
ocd-division/country:ca/province:qc/ed:lévis-bellechasse,Lévis—Bellechasse,2004-05-23,2015-08-01
ocd-division/country:ca/province:qc/ed:marc-aurèle-fortin-2004,Marc-Aurèle-Fortin,2004-05-23,2015-08-01
ocd-division/country:ca/province:qc/ed:montmorency-charlevoix-haute-côte-nord,Montmorency—Charlevoix—Haute-Côte-Nord,2004-09-01,2015-08-01
ocd-division/country:ca/province:qc/ed:quebec_east,Quebec East,1867-08-06,1968-04-22
ocd-division/country:ca/province:qc/ed:québec-est,Québec-Est,1968-04-23,1997-04-26
ocd-division/country:ca/province:qc/ed:rimouski-neigette-témiscouata-les_basques-2004,Rimouski-Neigette—Témiscouata—Les Basques,2004-09-01,2015-08-01
ocd-division/country:ca/province:qc/ed:rivière-du-loup-montmagny,Rivière-du-Loup—Montmagny,2004-05-23,2004-08-31
ocd-division/country:ca/province:qc/ed:rosemont-petite-patrie,Rosemont—Petite-Patrie,2000-06-29,2004-05-22
ocd-division/country:ca/province:qc/ed:saint-denis,Saint-Denis,1953-06-13,1997-04-26
ocd-division/country:ca/province:qc/ed:saint-henri,Saint-Henri,1953-06-13,1979-03-25
ocd-division/country:ca/province:qc/ed:saint-henri-westmount,Saint-Henri—Westmount,1979-03-26,1997-04-26
ocd-division/country:ca/province:qc/ed:saint-léonard,Saint-Léonard,1988-10-01,1997-04-26
ocd-division/country:ca/province:qc/ed:st-maurice-laflèche,St-Maurice—Laflèche,1935-08-14,1949-04-29
ocd-division/country:ca/province:qc/ed:st._anne,St. Anne,1896-04-24,1917-10-05
ocd-division/country:ca/province:qc/ed:st._henri,St. Henri,1925-09-05,1935-08-13
ocd-division/country:ca/province:qc/ed:st._hyacinthe-bagot,St. Hyacinthe—Bagot,1935-08-14,1949-04-29
ocd-division/country:ca/province:qc/ed:terrebonne-1867,Terrebonne,1867-08-06,1997-04-26
ocd-division/country:ca/province:qc/ed:three_rivers_and_st._maurice,Three Rivers and St. Maurice,1896-04-24,1925-09-04
ocd-division/country:ca/province:qc/ed:verdun-saint-paul,Verdun—Saint-Paul,1981-01-17,1997-04-26
ocd-division/country:ca/province:sk/ed:humboldt-melfort,Humboldt—Melfort,1953-06-13,1961-05-31
ocd-division/country:ca/province:sk/ed:swift_current,Swift Current,1917-10-06,1953-02-10
ocd-division/country:ca/territory:nt/ed:nunavut,Nunavut,1997-04-27,1999-03-30
Loading

0 comments on commit 2939706

Please sign in to comment.