Represent API: Data
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.
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.
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.
# Invoke must not be installed globally. pip uninstall invoke # Create a virtual environment. mkvirtualenv representdata # Install the requirements. pip install -r requirements.txt
Load the virtual environment:
Check that all
definition.py files are valid:
Check that the source, data and license URLs work:
Check that all data directories contain a
Update any out-of-date shapefiles:
Or update a specific shapefile:
invoke shapefiles --base=boundaries/ocd-division/country:ca/province:qc
Fix file permissions:
Check if the data request process spreadsheet is out-of-date:
Or less verbose:
invoke spreadsheet --base=. --private-base=../represent-canada-data-private > /dev/null
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.