Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Digital electoral boundary files for Canada, its provinces and municipalities

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ab
Octocat-spinner-32 bc
Octocat-spinner-32 fed
Octocat-spinner-32 mb
Octocat-spinner-32 nb
Octocat-spinner-32 nl
Octocat-spinner-32 ns
Octocat-spinner-32 on
Octocat-spinner-32 pe
Octocat-spinner-32 postcodes
Octocat-spinner-32 qc
Octocat-spinner-32 sk
Octocat-spinner-32 topojson
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .pep8
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 constants.py
Octocat-spinner-32 definition.example.py
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 tasks.py
README.md

Represent API: Data

Represent is the open database of Canadian elected officials and electoral districts. It provides a REST API to boundary, representative, and postcode resources.

This repository stores the digital boundary files for the database. The represent-canada repository is what's running at represent.opennorth.ca.

License

Open North has permission to redistribute all datasets in this repository. Please read the overall license and the LICENSE.txt file in each directory to know your rights. In some cases, you will not have permission to redistribute the dataset.

Data Quality

Lineage

All datasets are from government sources, with one exception: the postal codeOM dataset in the postcodes/fed directory is from Geocoder.ca. (Canada Post has sued Geocoder.ca for distributing this file.) The definition.py files will have more details on sources and any modifications made to the files. Postal CodeOM is an official mark of Canada Post Corporation.

Completeness

We do not have permission to redistribute every dataset available through the Represent API. For example, we do not have permission from the Government of Ontario to distribute its boundary file and postal codeOM concordance file (no longer available). You must download these files separately from Elections Ontario. You may then use the definition.py file we provide to load it into the database.

Maintenance

One-time setup

# Invoke must not be installed globally.
pip uninstall invoke
# Create a virtual environment.
mkvirtualenv representdata
# Install the requirements.
pip install -r requirements.txt

Regular tasks

Load the virtual environment:

workon representdata

Check that all definition.py files are valid:

invoke definitions

Check that the source, data and license URLs work:

invoke urls

Check that all data directories contain a LICENSE.txt:

invoke licenses

Update any out-of-date shapefiles:

invoke shapefiles

Fix file permissions:

invoke permissions

Check if the data request process spreadsheet is out-of-date:

invoke spreadsheet

Generate TopoJSON for inspection on GitHub:

invoke topojson

Tidy Python:

autopep8 -i -a -r --ignore=E111,E121,E124,E128,E501,W6 .

Contact

Please use GitHub Issues for bug reports. You may also contact represent@opennorth.ca.

Acknowledgements

We would like to express our gratitude to Kent Mewhort at the Canadian Internet Policy and Public Interest Clinic (CIPPIC), whose legal research (PDF) made it possible for this repository to be made public.

Something went wrong with that request. Please try again.