Browse

Quick Search

... by Riding
... by Candidate

Upcoming Nomination Meetings

|
Home: Blog--Guide to the Pundits' Guide
41st General Election Nominations Progress Chart

Nominations Progress - 41st General Election

Seats with First-Time Incumbents
 YTNTNUBCABSKMBONQCNBNSPENLTotPctWomPct
Seats1113628141410675101147308  
Lib11 157278844893619162%6232.5%
NDP 1 1576465616 211337%4035.4%
Grn1 116186127750263 19262%5729.7%
BQ        38    3812%923.7%
Cons  1302713117821543 19363%3819.7%
Ind     1       10%  
Oth    1  1     21%150.0%

BLOG -- Guide to the Pundits' Guide

Sunday, January 31, 2010

Riding Google Maps come to the Pundits' Guide

It's been awhile in the making, but I've finally been able to add Google Maps to the riding profile pages for each riding here at the Pundits' Guide. If you look at the tabstrip of menu options above the riding's electoral results, you'll notice that a 4th option has been added after "Riding Results", "Financial Metrics" and "Census Data", namely "Google Maps".

Selecting that menu item brings up a fully interactive Google Map of the riding, colour-coded to the party which last won that seat. The menu item is titled "Google MapS", because I expect (one day, hopefully soon) to be adding other maps to it, such as maps showing earlier elections and maps showing poll-by-poll results. That's where all the action will be, in other words.

I also think this map can be improved by adding neighbouring riding boundaries, etc., etc. If you have other ideas to improve it, or encounter any difficulties otherwise, please leave a comment below.

For the technical readers among you, the full URL to link to a riding profile page showing the map appends a "pane=3" parameter to the query string (financial metrics are pane=1, census data is pane=2). So, for example, here is the URL that brings up the map for New Brunswick Southwest:

http://www.punditsguide.ca/riding_e.php?riding=976&pane=3


As always, you can generate the correct URL for linking to by using the "Permalink" feature at the top right-hand corner of any database-generated (i.e., non-blogpost) page.

For the really technical readers among you, I'm using the Google Maps API v.2 and feeding it with a GGeoXml object which is populated by a PHP script that dynamically returns KML generated on the fly out of my database. Setting up this whole technical infrastructure is what's taken some time. The poll-by-poll version is still in the works.

Of course, this feature would not be possible without the commitment of the Geography Division at Elections Canada to make their data available publicly and for free, and I hope you'll join me in thanking them for that undertaking.

Anyway, this website has needed maps for a good long while, so I'm very happy everything could finally get pulled together. Stay tuned for more developments ... and if you really want to see more of them, you can always invite my beau golfing for another week or so down south ... I'll miss him terribly, of course, but will just get a whole lot more done that way. Welcome home, dear!

Labels: ,

Monday, September 21, 2009

Mmm ... More Marvellous Map-making !!

We've been following the amateur map-making efforts of members of the public, who are turning out some very professional efforts using the polling division boundary files ("shapefiles") recently liberated by Elections Canada, and commenter Cedric on my original post has now filed a very nice contribution indeed!

Cedric has taken the boundary files plus the poll-by-poll results for ridings in the 3 major urban centres plus Ottawa, and packaged them in a web application that uses the Google Earth Plug-in (relax, it's easier than it sounds), to let you pick a riding, zoom in, look around, zoom out, etc., to your heart's content.

To see it click here, and then pick a riding. If a little alert box pops up and says "ERR_PLUGIN_MISSING" (or something similar; I actually forget what it said now), don't worry: just click "OK", and then follow the link on the page to install the Google Earth plug-in which takes a minute or two, then click "refresh" in your browser.

His app shows one riding at a time, and colours the polls according to who won them, and is just very very cool.

The Google Earth plug-in allows you to see maps in the 3D Google Earth environment, rather than the 2D Google Maps environment everyone's familiar with. Normally Google Earth is a very large client program that you have to download and install on your own computer. But the Google Earth plug-in lets someone like Cedric put some data on his server, and show it to you in Google Earth format in a browser like Safari, Firefox or Internet Explorer, without you needing to install the whole darn Google Earth program on your own machine. It's kind of like the Macromedia-Adobe Acrobat Reader plug-in or Windows MediaPlayer plug-in that most people have installed without thinking too much about it and use every day. The Google Earth plug-in does need to contact a remote server, however, so if your Norton Anti-Virus pops up and asks if you want to connect, it should be OK (right, Cedric??).

While I'm at it, another very public-minded citizen, Kevin from Ottawa, has gone to the trouble of converting all the 2008 riding and polling division boundaries into KML for everyone, which as I have had several requests about it in the past, I know will be very well received by many readers. I'd been working on the same thing, but competing projects got in the way, so kudos to Kevin!

KML stands for "Keyhole Markup Language", by the way, and is the XML standard used by Google Earth and Google Maps to describe the details of a map that can be drawn on top of their native maps. It's called "Keyhole" because Google bought the company that originated the markup language (which was called Keyhole something-or-other). A KMZ file is nothing more than a compressed ("zipped") KML file.

All of which is to say that, if you liberate the data the people paid to collect, people will use it to make better things than Elections Canada has time for. I trust these examples have proven the value of this exercise, and would like to once again thank the Electoral Geography Division at Elections Canada for their commitment to do so, and the GeoGratis.ca site at Natural Resources Canada for providing the hosting space and bandwidth.

Now, about those poll keys and street indexes you folks at Elections Canada promised to think about supplying next .... please do! I think everyone has amply proved they can be put to very good use.

Labels: ,

Thursday, July 16, 2009

Mapping Data Update

Thanks to commenter "theonlysandman" from the website HomeZilla.ca on our recent posting about the mapping data recently released by Elections Canada.

Since Elections Canada only released the shape-files, HomeZilla.ca has converted them all to KML format readable by Google Earth and Google Maps.

[Yes, I recognize that last sentence would make absolutely no sense to anyone who hadn't studied Geographic Information Systems even a little bit, but trust me: it's huge, and a really appreciated simplification for lay users.]

It is a very large compressed file, available for download from their website. I'll just repeat the comment here, so you get all the details correctly. Over to you sandman:
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.

So, again, many many thanks for this contribution. OK, mappers: get to it!

Labels: ,

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: ,

Thursday, April 23, 2009

Another Victory for Open Government Data?

I received this letter from Elections Canada this morning, in reply to a letter I wrote last week requesting that Geographic Information System (GIS) files describing polling division boundaries, along with Street Indexes and Poll Keys, be made publicly available.
As you are aware, Elections Canada publishes the Electoral District Boundary Files in digital format (Shapefiles) of the 37th, 38th, 39th General Elections on the GeoGratis website. However, you are correct in saying that the polling division boundaries are not currently available on the Internet.

Our plan is to include the polling division geographic reference information on the GeoGratis website in the near future. In fact, our Geography department will undertake discussions with GeoGratis representatives to ensure that the digital polling division boundary files are available to the public. At the same time, we will also add the boundary files for the 2008 Elections (Electoral Districts and Polling Divisions). As for the Street Indexes, the Electoral Geography Division at Elections Cnaada is currently working on the feasibility of providing the Street Indexes and other products on Elections Canada website or other internet link.

If you have further questions, etc., etc. .... Thank you for bringing this matter to my attention and for your continued interest in the federal electoral process.
I hope they can put older elections up onto GeoGratis as well, but this would be a great start.

Thanks to the Electoral Geography Division for their commitment to open government data.

Labels: ,

Friday, April 17, 2009

UPDATED: MPs Voting Records Now Online

The Canadian Press is reporting tonight that the project to put MPs' voting records online, first reported in February by the Hill Times, is now set to go live.

This meets a longstanding request of online chroniclers of MPs' records, like Cory Horner of HowdTheyVote.ca, data-centric journalists like Glen McGregor of the Ottawa Citizen, and the NDP's House Leader Libby Davies, who championed the project at the Commons' Board of Internal Economy.

I'm not seeing it on the Parliament of Canada website as yet, but will post the link when it surfaces. I understand there is to be an RSS feed of the data as well, so we'll see what kinds of new web applications people out there come up with.

UPDATE: The votes of each member are listed on a tab in their MP's profile page on the ParlINFO site (thanks to Bill Curry's blogpost at the Globe and Mail's Bureau Blog). Here are the profile pages of each of the party's House Leaders:
And, here's how the Party Whips voted:
Incidentally, HowdTheyVote.ca tracks Hansard quotes as well as votes, and cross references the votes so you can check by Bill, Party or MP. Check it out. For example, here is their list of votes on Bill C-10, the Budget Implementation Act.

I don't see a similar cross-referencing at the ParlINFO site, but if someone knows where to find that information there, please post a comment here with the link.

Labels:

Monday, February 23, 2009

MPs' Voting Records To Become More Accessible

The Hill Times is reporting this morning on a very promising development: MPs' voting records are going to become accessible via a new database at the Parliamentary website:
[T]he database will kick off with the voting records for the 308 MPs during the 40th Parliament and will subsequently start reaching back to previous Parliaments .... [T]he software is being developed by House of Commons information services staff right now so "it's a matter of weeks" for this feature to be up.
OK, as a software developer, I can vouch for the fact that optimistic expectations for software projects to be finished in a matter of weeks can sometimes disappoint, but it certainly looks as though things are moving in the right direction.

I'd also like to second the view of Cory Horner from HowdTheyVote.ca who told the Hill Times that:
I would be pleased to see the Parliamentary website include voting data in their offerings, but I would urge them to also provide the data in some sort of machine-readable format so other websites may consume it (if they aren't going to do it, then I will). In addition, I'd love to see Hansard published in XML, as my previous attempts to get easier access to it have not borne fruit.
On the other hand, I will have to respectfully disagree with Messieurs Connacher and Rubin, who argued that the resulting data will be uninteresting if M.P.s were not found to vote differently than their parties. I suppose that is a news gatherer's perspective, since conflict makes news. But I would argue that people join political parties precisely because they share many common views, and since many voters cast their ballot based on party rather than individual (particularly in larger urban ridings), that is as democratic an outcome as any other. I'm not sure Connacher and Rubin realize how much MPs' budgets would have to be increased in order to allow them to develop well-formed individual opinions on each item of legislative business, if that's truly their objective.

But this also serves to make Mr. Horner's point, because the value added is in the Hansard debates ... seeing why the M.P.s came to the decision that they did. Add in the Proceedings of Committees, and you have a wonderful repository of historical context for decisions made on Parliament Hill.

All too often, government data has been presented for public use on the web in a manner that attempts to replicate the original printed documents, rather than in a form that is better cross-referenced and indexed for public access than those original documents ever could be. The Parliamentary documents such as Hansard, the daily Projected Order of Business, the Order Paper, and the Journals particularly fell victim to this approach. A well-organized Hansard Index 2.0, that spanned multiple Parliaments, would be a powerful research tool, and not just for gotcha journalism or "opposition research", but for legal researchers and historical scholars.

I hope that is the approach being taken by the Commons' Board of Internal Economy, and would encourage them to continue moving forward in that direction.

Labels: