opennorth / represent-canada

Point or postcode to electoral district service for Canada, its provinces and municipalities
http://represent.opennorth.ca/
MIT License
69 stars 9 forks source link

Write scrapers for individual major cities #7

Closed jpmckinney closed 11 years ago

jpmckinney commented 12 years ago

Existing scrapers are at: https://scraperwiki.com/tags/cdnpoli Existing scrapers are all under 100 lines, so you can easily read one or two to learn how to write a new scraper. Please write your scraper on ScraperWiki using PHP, Python or Ruby, and consult the list of fields to scrape.

Here's the logic for how we link representatives to boundaries. If the scraper sets a boundary_url field (to, for example, '/boundaries/census-subdivisions/3520005/'), we link the rep to the boundary whose url matches. Otherwise, if it sets district_id, we link it to the boundary whose external_id matches. Otherwise, if it sets district_name, we slugify the field's value and link it to the boundary whose slugified name matches.

Once your scraper is ready:

And you're done! If you have any questions, do not hesitate to ask represent@opennorth.ca.

Top 7 municipalities makes 1/4 of population. 13 for 1/3. 42 for 1/2. 126 for 2/3. 248 for 3/4.

jpmckinney commented 12 years ago

Update Ottawa to use this open data file: http://ottawa.ca/online_services/opendata/info/elected_officials_en.html

jpmckinney commented 11 years ago

Closing as this is an ongoing task.