postal code to edid scraper
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A way to copy's postal code to electoral riding id database. Statistics Canada sells a copy of a similar data set for $2,500:

This project frees this data up. No fee is charged, and no restrictions are placed on how you use the resulting data.

If all you want is data:

data/ is a list of postal codes, one per line, followed by the riding id. In cases where more than one riding id is returned by the cbc, each is listed on a new line.

data/index.csv contains a federal electoral district id, cbc riding id, name(en), name(fr)


Some postal_codes are probably missing. The initial list was built from public resources that may have been outdated. In any case, a few postal codes are added or retired every few months. If you have a more up to date list, please get in touch.

Techies: please help

Here are ways the technically inclined could help:

1 - Add “find your MP” functionality on various sites like to concretely show why this data is important.

2 - set up a free / low-cost web service to interface with this data and fetch missing data on the fly.

3 - Scrape other sources, so we can compare. There is evidence and the various political parties do not use the same up to date file, thus misleading voters.