Google Earth: Canada Federal Election 2008 (by polls)

Thornhill

Papineau

https://earth.smurfmatic.net/canada2008/polls/

Inspired by Stephen Taylor's post (and my own past project from Fall 2008), I set out to produce a website where people could navigate election results by riding, but also by poll.

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]

The webpage itself is rich in JavaScript and the code can be seen here. I use hashes to make the webpage bookmarkable and loadable with a given riding pre-loaded.

For instance, the Papineau riding (24048) can be accessed through this link:
https://earth.smurfmatic.net/canada2008/polls/#24048

The website requires the Google Earth plugin, available for Windows and Mac. It works very smoothly on my old computer (bought in 2003).

You could also download the individual KMZ files (they are in fact zip files, so on Windows you would rename them with .zip and unzip them with your usual utility). They are at: https://earth.smurfmatic.net/canada2008/polls/ridings/ . However, if I post updates (which I will), you won't see them.

Categories

, ,

Leave a comment


Type the characters you see in the picture above.

About this Entry

This page contains a single entry by Cedric published on September 17, 2009 8:15 PM.

L'autre choix, mini marché : food lovers' choice in Westmount village was the previous entry in this blog.

Linux rebooting on my Continental flight to HKG is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.