Run the following two commands:
./scripts/country-ca/run-all.sh
./scripts/compile.py ca
After running maintenance, manually check that the diffs on the CSV files make sense:
- If a row is added, check that a new boundary has in fact been added to that jurisdiction, e.g. by visiting the website of the relevant chief electoral officer.
- If a row is deleted, check that a boundary has in fact been removed from that jurisdiction, or that the row exactly duplicates another row.
- If a row is changed (usually the boundary name), check that the new name makes sense.
For specific files:
ca_municipal_subdivisions.csv
is generated from the Represent API and may have many additions/deletions, as boundary sets are added/removed from the API.- For divisions in Quebec only (starting with
24
),ca_municipal_subdivisions-has_children.csv
scrapes this page and may have many changes betweenY
toN
. As long as not all theY
becomeN
, the change should be fine.
province
: provinceterritory
: territoryfed
: federal electoral districted
: electoral districtcd
: census divisioncsd
: census subdivisionborough
: municipal boroughdistrict
: municipal districtdivision
: municipal divisionward
: municipal ward
- At the provincial level, MB, NL and SK use textual type IDs for electoral districts. All other jurisdictions use numeric type IDs.
abbreviation
: English Census or local abbreviationsabbreviation_fr
: French Census or local abbreviationsclassification
: Census subdivision typesdata_catalog
: Official data catalog URLhas_children
: Whether the division has childrenname_fr
: French namesnumber
: Numeric local identifiersorganization_name
: Municipal corporation namesparent_id
: Upper tier municipality OCD-IDposts_count
: Number of posts in the municipal corporationsgc
: Standard Geographical Classification (SGC) codesurl
: Official website URLs
- Does the jurisdiction use identifiers?
- Does the jurisdiction translate names?
- Prefer an official government source. For electoral districts, prefer election officials to legislatures.
- Prefer the source with correct names.
- Prefer the source with correct formatting (dashes).
- Prefer the source that is easier to scrape.
The Standard Geographical Classification is an official publication of Statistics Canada since 1974.
- Effective October 20, 2008, Yukon Territory became Yukon.
- Effective October 21, 2002, NF became NL.
- Effective March 21, 2003, Nfld.Lab. became N.L..
- On April 1, 1999, Nunavut came into being officially as a Territory of Canada.
- represent-canada-data
abbreviation
: To map province and territory abbreviations to namesclassification
: To determine an appropriate subdivision labelhas_children
: To determine whether a shapefile must be requested for a divisionorganization_name
: To set an appropriate authority for a shapefilesgc
: To retrieve an identifier from an SGC codeurl
: To provide a URL from which to request a shapefile for a division
- scrapers-ca
parent_id
: To determine the administrative subdivisions of Census divisionsclassification
: To determine an appropriate jurisdiction namesgc
: To retrieve an identifier from an SGC codeurl
: To provide a URL for the jurisdictionposts_count
: To create posts automatically