Since we are, apparently, heading into an election up here in Canada, I thought it would be great time to share this fantastic website my friend Diederik Van Liere recently pointed out to me.
The site, created by Montreal developer Cedric Sam, is a mashup of 2008 federal election and polling data, federal open data from the Geogratis website and Google Earth. It allows users to see how support for candidates was distributed within ridings. Something any political junkie could enjoy.
I used cartographic data from the Geogratis.gc.ca website. I imported the Shapefiles to a PostgreSQL database with Postgis. Then, I processed results by polling divisions from the 2008 election, data available on the Elections Canada website. It was put in a separate table on the same database. A custom program in Python using the very handy libkml (a code library developed and supported by Google) took the data and outputted pretty KML code. It was packed as a KMZ and uploaded to my webspace. [E-mail me, if you want to exchange ideas on the code].
I of course love the fact that Cedric, like many great hackers I meet, is always keen to work with others to make the code better or explore how it might be enhanced.
As I now live in Vancouver Centre I obviously couldn’t resist pulling it up. Here’s a screen shot… but I encourage you to check out the site yourself!