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:
change its status to "protected"
share it with the users "jpmckinney" and "rhymeswithcycle"
set its schedule to "once per week"
tag it with "cdnpoli"
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.
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 whoseurl
matches. Otherwise, if it setsdistrict_id
, we link it to the boundary whoseexternal_id
matches. Otherwise, if it setsdistrict_name
, we slugify the field's value and link it to the boundary whose slugifiedname
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.