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

Wednesday, November 11, 2009

2000 Transposition Properly Entered Now

If you've had a close look at any of the riding profile pages (for example Hochelaga, QC) for the 2003 representation ridings before, you'd have noticed that the listings under "2000 Tr" often seemed incomplete, especially in ridings having large numbers of parties running in the 2000 GE.

Without getting too long and complicated here, Elections Canada assembles several documents after a redistribution is finalized, to redistribute the population between old and new ridings, as well as to redistribute the votes to see how the parties would have fared on the new boundaries. One of the documents they generate in that process is a listing of which parties won each new seat, based on the previous vote, and listing them in order of votes obtained (called the "Ranking"). But they only do the first 4 parties per riding in that document, lumping everyone else together under "Others", and this is the only document available on their website for free. So when I first assembled the data for this website, that's what I used for the 2000 Transposition Order riding level results.

However, particularly in either Québec ridings, or ROC ridings where the Canadian Alliance and Progressive Conservatives were both running, this masked the actual vote of the NDP, and occasionally some of the other parties as well (e.g. the Canadian Alliance vote in some Québec ridings). The full Transposition of Votes, on the other hand, shows true totals in each riding for the Liberals, Bloc Québécois, Canadian Alliance, NDP and Progressive Conservative Party, regardless of their ranking or performance, grouping the rest of the candidates into "Others". Sorry, the totals were not computed for the Greens by Elections Canada, so I'd have to manually break that out for them, which I haven't done just yet.

But I have now entered the complete values for the other 5 parties plus "others" into the 2000 Transposition, and also added the Population and the number of Electors for each riding. Now we can see that the NDP obtained 1.9% of the vote in the 2000 Transposition in Hochelaga (one-tenth of what they got on Monday night).

Something about this has caused a slight problem with the calculation of the top of the stacked area chart part of the Bar + Stacked Area Chart graph, but I'll get to fixing that in a bit. I have deleted all the old charts, and so they'll be regenerated one at a time for each riding the next time one of you requests that riding in a given language in a given chart format. It shouldn't take too long to regenerate the whole batch of them, and hopefully will be imperceptible to the user.

Other calculations will also have changed slightly as a result, but in favour of being more accurate. It would be good to eventually tease out the vote for the other parties manually, not only to see the Green Party vote, but also the seat where the Marijuana Party came second, etc. etc.

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

Monday, August 10, 2009

Data Analysis in Other Canadian Political Blogs: Stephen Taylor Rocks Google Earth

I knew it would not take much time for the very good programmers out there to start to make some really good use of the recently-released Elections Canada polling division shape files, and Conservative blogger Stephen Taylor has demonstrated he's no slouch in the mapping wow department.

He has taken the polling division results and geographic information from the shape files and built an application for Google Earth, demo'ed in a YouTube HD video here. He's also planning to make the information available as an API (that's programming lingo for "shareable to other programmers").

Hats off to Taylor for a beautiful demo and a very solid contribution. I'll be adding some Google Maps functionality to the Pundits' Guide soon myself, but Taylor has definitely set the standard here. Bravo Stephen!

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

Saturday, February 7, 2009

2008 Official Voting Results now entered

As previously reported, the 2008 Official Voting Results were released by Elections Canada on Tuesday February 3. I've now incorporated that data into the Pundits' Guide database, which means a few things:
  • The values for "Population", "Electors", "Total Ballots" and "Valid Ballots" (i.e, "Voted"), "Number of Polls" and of course "Number of Votes" have all been updated to what Elections Canada is now reporting. This could subtly affect statistics you've been using for your analyses (for example this analysis recently conducted by Globe and Mail blogger Robert Silver), particularly if you were using Percent Turnout, a party's Vote Percent, and the various Margins and Percent Margins of victory.
  • The values for candidates' Residence and Occupation have now been added, although curiously Elections Canada did not translate the Occupation data this time.
In the absence of translated Occupational data, I've adjusted the Riding Profile and Candidate Index pages so that the occupation is shown in the reported language if not available in your chosen language of interaction.

Their previous translations were not always accurate, one reader recently advised me, which might have been a reason for their omitting them. Should Elections Canada update that data and I notice it, I'll certainly update this site with the translated descriptions.

Labels: ,

Tuesday, February 3, 2009

2008 Official Voting Results released

As previously mentioned, the Official Voting Results for the (2008) 40th General Election are now available for searching and/or downloading at the Elections Canada website.

They represent the 3rd stage in the reporting of election results (after the "preliminary" and "validated" stages, occasionally also involving the post-judicial recount stage; see the Pundit Metrics page description).

They are accompanied by an Election Results Map found here (WARNING: large PDF).

The Chief Electoral Officer's report on the election was also tabled today, but I haven't been through it yet.

Back to the official voting results: the main items of interest that number-crunchers will be most interested in are (WARNING: they are large files, especially the PDFs):
The raw data for all the tables can be downloaded from here.

If you're just interested in searching, stick to their Official Voting Results web application found here, or give me a day or so, and I'll have them incorporated into the Pundits' Guide.

Now, permit me to repeat one grumble. Elections Canada publishes poll-by-poll results, but does not make poll boundary information available for free download, nor is it possible to even purchase boundary files (used by GIS/mapping programs) that describe the poll boundaries. Elections Canada prides itself on its commitment to making elections information open and accessible, and even points out that it has won awards for its website and the way it makes such information available. However, more than one reader has written to me and said that this is the major remaining gap in information. It's all very nice to have the poll-by-poll data, but without the maps, or downloadable street indexes and poll keys, or the boundary files, that data is meaningless. You can purchase some of it here, however, and it is provided for free to candidates, Members of Parliament and the political parties.

OK, I've got that rant out of my system. Now back to enjoying your number-crunching, folks.

Labels: ,

Friday, December 5, 2008

2008 Poll-by-Poll Results now available

One of more frequent enquiries I receive concerns the availability of poll-by-poll results after an election.

Well, in case you missed this news amidst all the other political coverage yesterday: Elections Canada announced the availability of "validated" poll-by-poll results on their web-site.

You can get them by riding, by province, or for the entire country by clicking here.

As explained elsewhere on this site, "validated" results represent the second step of a three-step process; and as Elections Canada explains, these validated poll-by-poll results will be superceded by the "official" results once they become available. Given that validated poll-by-poll results have not been made available for recent by-elections (and I don't recall them as having been made available for previous general elections), this represents an improvement in service from the Elections Canada site, so bravo!

Unfortunately, they have not included the number of electors in these validated results, presumably because that number itself would not be finalized until the various amendments to the National List of Electors were processed and verified for the Official Voting Results (but they've provided an overall preliminary number elsewhere, which presumably could have been made available on a poll-by-poll basis as well).

Moreover the published results do not include party affiliation of the candidates, so you need to join them to another list to get those. These omissions were unnecessary and make the data less helpful than they could have been.

Another small gripe I have, while I'm on the subject, was the omission of the number of polls reporting from the downloadable Election Night Results they provided here. That data was supplied by Elections Canada to the Broadcast Consortium, so I don't know why Canadian citizens and taxpayers should not have had access to comparable data without looking it up manually one riding at a time.

And, of course, I'm still equally at a loss to comprehend why "as reviewed" data could not be made available either in a downloadable form or online for the 1997 General Election, rather than simply the "as submitted" data, or why researchers should have to file an Access to Information request to get it, when comparable data is available for later elections online.

OK, I'll stop grumbling now. I know they're over-worked, and I'm sure more than one person over at Elections Canada groaned at the prospect that they might have to organize ANOTHER election in case the Governor-General did not approve a prorogation or dissolution. Perhaps one of the best outcomes for me of a majority government would be the opportunity it gave Elections Canada to get its public data offerings in better shape. But, of course, the era of perpetual minority governments is probably what drives traffic to this site, so I should not look a gift horse in the mouth.

Labels: ,