opennorth / represent-canada Goto Github PK
View Code? Open in Web Editor NEWPoint or postcode to electoral district service for Canada, its provinces and municipalities
Home Page: http://represent.opennorth.ca/
License: MIT License
Point or postcode to electoral district service for Canada, its provinces and municipalities
Home Page: http://represent.opennorth.ca/
License: MIT License
Some addresses contain Unicode spaces.
Uses the hashtag as the form input value and submits.
We can also add the Environmental Defence logo, and maybe remove Make them work for you and Next Parliament (or move them to a different page).
The beginnings of a little OS ecosystem?
And fix the two "wtf" comments.
Electoral calendars:
Some provinces publish election dates:
Twitter accounts:
All BC provincial electoral districts, for example, amount to 1MB of data, which is not very mobile friendly. If increasing the simplification leads to poor results at high zoom levels, we may want to add a "mobile" version of the shapes as well.
Geocoder.ca is not very reliable. Use GovKit-CA to create a concordance file at the federal level.
Send us e-mail when CPU utilization stays above ~90%
The City of Vancouver recently updated their website and images are now broken.
Link to Mayors page with photo
Link to Councillors page with photos
The site is still up and down. These pages might not work when you try them.
To offset inaccuracies caused by using the postal code centroid. Currently, such queries are very expensive.
Keep track of most popular exceptions to see if API documentation needs improvement.
Here's a wishlist, which may be broken into smaller issues once we start coding the dashboard:
I've contacted all parties that currently do not permit distribution and am awaiting responses. The affected jurisdictions are:
I asked PEI about putting a license on their website, and they did! Alberta distributes data through AltaLIS, so it would be a lot of work to change its license. Nova Scotia has a license in its geospatial metadata file; convincing them to change it may be too much work.
see old Boundary Service code
Allow filtering on boundary set and representative set, so that you can get only federal-level information, for instance.
Possible name: elus.opennorth.ca
To more easily identify where to focus on improving the database.
Perhaps we can have slugs that are shorter than these full names.
Non-profits and advocacy groups will want to retrieve electoral districts (and possibly other information) for postal codes in their databases. A web or desktop tool to perform these lookups will help get more users for Represent, and make it a more attractive project to fund.
Some users of howdtheyvote.ca's API prefer XML.
No data sources found yet. We have lists of municipal associations which may have data.
Pupa (official):
Pupa (unofficial):
Scraperwiki (official):
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 [email protected].
Top 7 municipalities makes 1/4 of population. 13 for 1/3. 42 for 1/2. 126 for 2/3. 248 for 3/4.
Twitter handles change. To account for that, we may want to write a separate scraper that uses Twitter account IDs to get the latest handle, which other scrapers integrate with. Facebook doesn't let you change your URL, so reps would need to create a new account to invalidate our data (sucks to be them?). Likewise with changing Twitter account ID.
Scrapers may just need a big hash of name to social media accounts.
Yajl is the fastest JSON parser.
We haven't asked Yukon or Northwest Territories, as we don't have boundaries.
Note: If we want to extend to cities, Montreal has a web service that performs a concordance.
Compile static CSV files daily and upload to S3.
Because the API samples are loaded via ajax, if you loaded the page via an anchor link, your position will jump after about a second to somewhere you didn't want to go.
Change the representative name link to a name followed by URL, e-mail, and API icons.
98.6% of the calls to HowdTheyVote.ca's API are postal code lookups, with another 0.9% lat/lng lookups. When the House of Commons is in session, traffic often reaches 10,000 requests. It sometimes jumps to 200,000 requests in a day when a major campaign is underway.
Privacy Policy
<DATE PUBLISHED>
We care about your privacy. If you have any questions about this policy, feel free to contact us at [email protected].
Information we collect
Log information - When you use this site, our servers automatically record information that your browser sends whenever you visit a website. These server logs may include information such as your web request, Internet Protocol address, browser type, browser language, and the date and time of your request. We use server logs to track usage trends and to maintain, protect, and improve our services.
User communications - When you send email or other communication to us, we may retain it in order to process your inquiries, respond to your requests, and improve our services.
Information security
We do not share or sell any information that may potentially identify individuals, such as IP addresses.
Changes to this policy
Please note that this privacy policy may change from time to time. We will post any policy changes on this page.
eg http://mapit.mysociety.org/area/2514.html
The Alberta Ministry of Municipal Affairs and possibly others publish information about their municipalities' mayors and councillors. We want to email them to ask for lists of mayors (and ideally councillors) with contact information, for every municipality in their jurisdiction.
We have contact info for ministries of municipal affairs and municipal associations. Ministry data is preferred over municipal association data. Issue #16 tracks the effort to scrape available info from ministries and associations, and may contain additional relevant info.
A sample letter for requesting ward boundaries can be tailored for this effort.
Feel free to contact [email protected] if you have any questions.
Avoid further forking of Boundary Service.
e.g. whether a certain location or representative is "hot"
We coordinate our progress around this spreadsheet. Need to check existence of ward boundaries in: MB, NB, NL, ON, QC.
In the "Ward boundaries" column we track progress with the following ad-hoc codes. Feel free to invent your own, as the following don't cover all possible situations:
Once we know which municipalities have wards, we email them to:
A sample letter is given in this document. You may make any modifications you wish (including shortening it).
We ought to think about incentives for cities to keep us updated. If possible, a good incentive would be if we were able to provide postal code concordances.
Feel free to contact [email protected] if you have any questions.
http://en.wikipedia.org/wiki/List_of_municipalities_in_Ontario
http://en.wikipedia.org/wiki/County#Canada
In Sarnia, for example, some city councillors also sit on the county council. In Ontario, at least, each division of a county is a census subdivision. The current schema assumes representatives belong to a single boundary. I don't see a problem with creating a "duplicate" representative and associating them to another boundary.
Group provinces, municipalities...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.