Quebec Municipal Elections 2013
Election results for your postal code
November 4, 2013
Below is a demo. You might get a better experience if you view it as published
There isn't much journalistic depth here, but I did conduct interviews with government technicians to ensure all would go as planned on election night.
The neat tricks here:
- Google Fusion Tables is quick-and-dirty.
- Fusion Tables doesn't highlight a polygon when you click on it. My solution: bake out each region as its own TopoJSON-encoded flat file. When the user clicks a region, Fusion Tables reports the region's ID, the app fetches the TopoJSON for that ID, and the app draws a polygon on top of the Google Map.
- Looking up electoral regions by postal code was very difficult. The City of Montreal outputs a list of all addresses in the city and their city-specific regions. And sometimes in Canada, the first three digits of a postal code map exclusively to a single municipality. But if a postal code isn't in Montreal and its first three digits don't map to one municipality, I'd need to find a latitude/longitude with Google's Geocoder service, then find the region that point is in with Google's Fusion Tables API. (Why not always use Google's geocoder? Because there's a quota.)
- Since this was all flat files, it was easy to host and update on Amazon S3.