hit counter script

August 10, 2009

Google Earth demo – 2008 General Election poll maps and results

For the past week or so, when I’ve had a spare moment in the office, I’ve been working on a mapping project involving Elections Canada data and the Google Earth KML standard.  For anyone that’s worked on a political campaign or in a Member’s office, poll maps are always close by and always useful for plotting strategy for the next election.  Elections Canada provides data for drawing these polls maps, but unfortunately this data is not available in a format or projection readable by Google Earth or Google Maps.

I’ve gone ahead and translated and reprojected (after crashing my computer a few dozen times) the geographical coordinates that dileaneate the approximate 60,000 polls that make up the 308 ridings.  I’ve written software that represents these data points as polygons in Google Earth and shades them by poll winner (party) or by party vote share by poll (Conservative, Liberal, NDP, Green or Bloc).  I’ve also included an option in the software to shade the map by voter turnout.  These maps have an obvious political purpose, however, addressing low voter turnout is a non-partisan interest shared by most.

I’ve been working on writing an API to make this sort of data available to developers through a few GET requests.  I’ll keep you updated.  If you’ve got any questions, please send me an email or put a comment in the comment section below.  Here’s the demo, in all the wondrous splendor of Youtube HD.


(click the “full screen” button for the best experience)

This entry was authored by Stephen Taylor at 11:13 AM | Tweet this | Add a comment
| Feedback | #
  • Garry R. Holland
    Stephen; I'm not a techie but I do understand the value of mapping. I have created a numerical database for our Riding, Esquimalt-Juan deFuca, giving the rankings of the votes of 2008 Gen. Election, using E.C. data.
    The challenge I've been unable to win thus far, is to translate the database into a colour-coding of individual polls.

    Paul Holmes directed me to your site and I would value discussing this issue with you.
  • batb
    Yeah, Gabby. I'm sure that with our help the universe will continue to unfold as it should ... ;-)
  • terry1
    gabby is president of the flat earth society a reformatort subsidiary ...LOL
  • Gabby in QC
    “gabby is president of the flat earth society a reformatort subsidiary …LOL”
    As usual, Terry1, you're way off the mark.
    Of the “flat-out-truth society,” maybe.

    But, have you forgotten ?…
    I’m “the lone reformatory” left in QC, as you’ve described me time and again, so you are contradicting yourself yet again.
    If I’m “lone” how can I head a society, i.e. a group of people?
    See how nonsensical and flawed your statements are, not to mention your childish name-calling?

    BTW, you’ve been making a mistake for some time now, writing “reformatort instead of reformatory.
    You can’t even keep that simplistic tag straight. :-D
  • I'm going to keep moderating these off-topic comments
  • Omanator
    While I found these off topics comments annoying and many times wished they could just be removed, I wonder as some others have done, if we should not let Terry1 continue.
    It's the best way to show what the LPC stands for.
  • I'm going to keep moderating these off-topic comments
  • I'm going to keep moderating these off-topic comments
  • jsgxfn
    I'll say~!
  • Hey Stephen,

    Congratulations on your project. I managed to do the same thing but only at the riding level, published on earth.smurfmatic.net and also used on French national television: http://www.youtube.com/watch?v=jOgqobWb9Q0

    I saw the election results data per polling station, but did not know the existence of equivalent geographical data. Do you know if that's publicly available?

    There's a fantastic potential into mapping real useful data such as these onto the real geographical world. It seems like a map is sometimes worth a thousand words!

    -Cedric
  • batb
    Oh oh. More technical mumbo-jumbo, impressive though it is ... I guess!!

    Call me a Luddite -- I actually wear the label without embarrassment -- but pretty soon anyone who hasn't the technological capabilities to decode and take advantage of this stuff is going to be left out of the loop.
  • Gabby in QC
    Not to worry, Batb.
    We Luddites will make sure the loops are properly designed, aligned, sequenced, enumerated, verified, distributed, etc. ;-)
  • bluegreenblogger
    Very nicely done. It's nice that EC is actually giving this data out no charge. Expect a more competetive environment this fall!
  • Amazing, but this will crash my computer. I have no doubt whatsoever about this.
  • joannetb
    I am in awe.

    Well done Stephen. You are brilliant!
  • Joel French
    Cool, Stephen. I definitely dig the Google Earth idea.
  • Mike
    Hi Stephen,

    Wow that is quite ambitious, for the general riding results,

    Someone has already done one, his webpage is here:
    http://earth.smurfmatic.net/canada2008/

    And he has done one for the Quebec 2009 election too
  • alanhall
    Excellent work!

    Here's a Google maps version of the 2006 poll-by-poll results for Guelph:

    http://maps.google.com/maps?f=q&hl=en&geocode=&...
  • I am impressed. Welcome to the world of Googlism.

    Thanks for giving me the opportunity to see how my polling area did in Toronto compared to others. As for your party, it has a chance to win two or three seats within Toronto if you target selected polling areas and ridings and increase your vote by five percent. The NDP could potentially win another two seats. The Liberals just have to hold their fortress.
  • This is quite impressive!

    It might also make a cool video game.
  • It is a video game too. Google Earth has a flight simulator mode. They have yet to implement a direct mail letter drop feature into the swing polls of your riding.
  • Phil
    When can we download it?
  • Swift
    Differences from previous elections are very valuable as well. Putting the 2004 and 2006 elections in the data base could greatly increase the usefulness of this project. Add a feature which shows the percentage change for each party in each poll (raw votes) and also one that compares the change in each poll compared to rhe average change in the riding. I well be talking with the expected campaign manager in my riding in the next couple of weeks about my poll by po;; analysis of the last two elections and possible strategies or the next one that are the result of that analysis. If this could be tied in with the information in CIMS, there could be a very large amount of useful information extracted.
  • Canadaka
    Very cool!
    I look forward to a future API, I bet I could find some uses for it.
  • I think I will start by releasing riding boundaries through the API.
  • Omanator
    Having worked in many election campaigns, I know first hand how import poll maps are.
    Too many times we had errors in the maps etc. To simply use your computer to verify things
    is awsome. Great j0b.
  • The riding boundaries are one thing - but it is the poll boundaries that are more impressive.

    Does Elections Canada charge you for the data they sent you? How much?

    I'm an amateur, but I'm interested in getting this done for Saskatchewan provincial election results. What product did you use to convert into the long/lat data?

    Cheers,
  • awkeyes
    Well done Stephen. Thanks very much.

    Andrew
  • MikeG
    Very cool.
  • pmoharper
    Very awesome work Stephen! Lot's of potential too.
blog comments powered by Disqus