Browse

Quick Search

... by Riding
... by Candidate

Upcoming Nomination Meetings

|
Home: Blog--Guide to the Pundits' Guide

BLOG -- Guide to the Pundits' Guide

Wednesday, July 8, 2009

Calling All Mappers !!

Your Guide is quite thrilled to report this morning that Elections Canada has now made polling division boundary shape files available for free through GeoGratis!!

OK, about three people like me just started jumping up and down for joy. For the rest of you, I'll try and explain in normal English what very nice thing Elections Canada has just done for us.

If a picture is worth a thousand words, then a coloured electoral map is worth an entire relational database. Pouring over tables of numbers is hard, but seeing colours on a map tells a much richer story very easily.

So, what does it take to make the map? Well, you need to be able to draw the boundaries of things onto base maps. These are the boundary files. They give you each of the dots (as a point of longitude and latitude) that you need to connect in order to draw a city or a federal riding or a census tract onto the base map. Then you can programmatically colour in those shapes with meaningful colours, and put little markers on them in various places if you like too.

Various government jurisdictions, which have of course collected all that data using our tax dollars, are deciding at various paces to make it available to the public. Not everyone has the time or inclination to learn how to use it or what to do with it, but a lot of people do and the Google Maps API is making it easier and easier to create some very interesting "mash-ups" of mapping and other data.

Until this point, Elections Canada had only made boundary files of the federal ridings public. But as any political junkie will tell you, they want the poll-by-poll data to really make sense of what happened in a certain riding. Elections Canada does publish the poll-by-poll numeric results, but until now, THERE WAS NO WAY TO ACTUALLY KNOW WHERE THOSE POLLS WERE (unless you were a senior party activist with access to the data, a university student or professor, or someone with extra piles of cash sitting around to buy the physical maps, and tons of time on hand to construct your own boundary files).

This frustration led me to write to the Chief Electoral Officer in April (apparently joining many others, as I discovered), and request that such data be made available for free at the government's online depot of Geographic Information Systems information, called GeoGratis. The Elections Canada Geography Division agreed, and last night I received an email saying that the data had arrived. Yippee!

It's available in "shape file" format (this is the main proprietary format for boundary files, which can be converted if you know what you're doing into XML data formats usable by Google Maps, or PostGIS-compatible database formats if you're familiar with PostgreSQL). You can find the files and supporting documentation here. GIS files can be pretty big, which is probably why they're specially hosted at the GeoGratis site at Natural Resources Canada, and not on the Elections Canada site itself.

I'd been tinkering with this a bit already, and hope to add some functionality along those lines to the Pundits' Guide (starting with the 4 by-election ridings), but first I have to get some paying client work out of the way, and finish up with getting the 1988-1993 election results proofread and entered. So, stay tuned, and meantime: Bravo Elections Canada for your commitment to Open Government Data!! Oh, and thanks to a reader for passing this along by email last night.

Labels: ,

18 Comments:

Blogger Edmund said...

Huzzah! I can pretty much guarantee many, many activists will be salivating over this data once it's put together. Sadly, my technical expertise isn't up to putting together the maps, but I'm really looking forward to seeing the results.

July 8, 2009 8:44 AM  
Blogger Prairie Topiary said...

You're right -- this is a big deal! Any time I've searched for poll-by-poll maps of ridings, I've found them nearly impossible to find.

July 8, 2009 11:58 AM  
Blogger The Pundits' Guide said...

Edmund, hope not to disappoint.

Prairie Topiary, will we be seeing some Manitoba analysis of them from you, then?

Thanks to you both for taking the time to comment.

July 8, 2009 12:20 PM  
Anonymous Cory Horner said...

Magnificent. You know what i'll be doing tonight...

July 8, 2009 12:49 PM  
Blogger o.NDP said...

It's about damn time they released this stuff! I look forward to your mash-ups Pundits Guide!

July 8, 2009 12:51 PM  
Blogger The Pundits' Guide said...

OK then, no pressure at all, eh o.NDP!

Cory (publisher of HowdTheyVote.ca, if you don't mind me pointing it out, Cory) is probably going to do a bang up job of things as well!

Thanks for stopping by, folks.

July 8, 2009 1:25 PM  
Blogger David Akin said...

This is great news Ms. Guide for all those who've been fighting for our government to give us raw data it owns, be it GIS files or other databases.
Can't wait to see what all you scripting hotshots come up with!

July 8, 2009 6:28 PM  
Blogger The Pundits' Guide said...

Hi David, This post got Tweeted by @michaelgeist this morning, and received wide broadcast as a result all day in the Twitosphere. I fully expect the early take-up on those files to be very good indeed!

Thanks for taking the time to stop by and comment.

July 8, 2009 6:36 PM  
Blogger Chris said...

This is very exciting news! My inner nerd is celebrating today.

July 9, 2009 4:53 AM  
Anonymous Bluegreenblogger said...

Excellent! Now all we need is the census data to go with it, and we'll change the political 'map' of Canada!

July 9, 2009 11:21 AM  
Blogger The Pundits' Guide said...

Mine too, Chris.

BGB, getting StatsCan's cost recovery mandate dropped is going to be a much bigger project.

July 9, 2009 1:01 PM  
Blogger theonlysandman said...

This is great news, my company HomeZilla had to do a bunch of work to to setup this stuff a year ago...

Bluegreenblogger: who would you want the cencus data layered? We do some of that already at HomeZilla.

July 10, 2009 10:50 AM  
Anonymous Bluegreenblogger said...

theonlysandman:
With long form census results,and poll by poll election results, you can start looking for unexpected correlations between demographic factors and election outcomes. For a Party like the Green Party, with limited research budgets it would be possible to search by imdividual polls for areas where the actual results either excelled, or fell behind expected results. Great tool for targetting polls for special attention. Also, correlations between demographic factors and existing donors, and volunteers can be extracted, once again providing geographic targets for membership drives, volunteer recruitment etc. The uses are endless, and the mapped data can be presented visually for those not comfortable with lists and charts.

July 10, 2009 12:20 PM  
Anonymous the506 said...

I and a couple of other folks have put some maps up already:

http://uselectionatlas.org/FORUM/index.php?topic=98141.0

July 11, 2009 12:52 PM  
Blogger The Pundits' Guide said...

Hey, great work you guys! I've just written a little blogpost about it to share with my readers. Hope you guys don't mind a few visitors!

July 11, 2009 1:55 PM  
Blogger theonlysandman said...

We noticed many people were having a hard time with the ShapeFile so we have created a KML file that people can you in Google Earth.

You can download it from the HomeZilla site.

Warning: It is a big KML file 19M compressed, 44M uncompressed.

The government license and orginal ShapeFiles are located here.

July 16, 2009 10:33 AM  
Blogger The Pundits' Guide said...

This is fantastic, thank you HomeZilla.ca !

July 16, 2009 10:49 AM  
Blogger Cedric said...

Hello!

Using this new data, I made a site using the Google Earth plugin:
http://earth.smurfmatic.net/canada2008/polls/

The polling divisions are coloured by the winner and margin of victory at during the 2008 election. It could be theoretically re-coloured to anything from voter's turnout, party performance, etc. (Stephen Taylor outlined it in his YouTube video).

September 18, 2009 1:13 PM  

Post a Comment

Links to this post:

Create a Link

<< Home