The Atavism

Wednesday, November 9, 2011

Election graphics

As you may have noticed, there is an election around the corner. I'm not about to subject anyone to my political opinions, but I do have an area interest in which I could probably match the most tribal Labour or National supporter for fervent opinion. Bad graphs. Being able to clearly and succinctly display data is a really important scientific skill, and it's one that some of  our newspapers have so far failed to develop. Take this chart, which appeared in the Christchurch Press and is apparently showing the break-down of a recent poll (thanks to John Kerr for pointing this out on Stats Chat)


I have no words. I honestly have no idea why there is a third dimension in this chart, or, really what I'm meant to take from any of it. This was so bad I had to have a go at fixing it. 

The point of a political poll is to tell which party, along with its idealogical allies, is likely to win a majority of the seats in parliament. Since we are talking about proportions, and there is a real "something" that those proportions add up to, this a rare case in which a pie chart (or its bastard cousin the torus) might make an effective visualisation. Even so, people are generally better and assessing differences between lengths of objects than their area, so I went with a stacked bar chart.

Of course, even MMP isn't a perfectly proportional electoral system, and, especially with the overhang likely caused by the Māori Party winning more electorate seats that their party votes alone would entitle them to, the break-down of seats in parliament won't exactly match the break-down of the party vote. Here's what would happen if these results were mirrored on election day, and Act, Mana and the Māori Party held their electorate seats while the fine people of Ohariu-Belmont remove Peter Dunne, the Member for the anti-1080 lobby.

In this case, if Act were to lose Epsom the next list seat would go to the Green Party. Of course, you shouldn't use a single poll to say anything very meaningful about what a specific result is likely to be. Polls are estimates of what's going on in the population at large, and estimates always come with uncertainty. We can go some way to quantifying that uncertainty but giving each estimate a "margin of error". Using some slightly twisty logic you can say, "we don't know what the support for the National Party really is, but if it was 52.6 %, as our poll suggests, and we did lots of surveys, each of 1000 people, then 95% of the time we'd get a result between 49.5% and 55.7%". It's hard to include that uncertainty in a stacked bar chart, so here's each estimate from that poll, along with its margin of error (the "2nd seat" line is at 1.2%, the point at which a party with an electorate seat would probably get another on the list, the "govern alone" line is 51.6%, the proportion of party votes required to get 62 seats, a majority in a 123 seat parliament*)

If the fairfax poll was the only thing we had to go on, it might give left-leaning folks (like me) some hope that the true value of the National Party support was less than the "govern alone" threshold. Unfortunately, we have a whole series of polls conducted over the course of the year that suggest National's support is pretty close to the point estimate, and there appears to be little trend across those polls (except perhaps the Green party picking up Labour supporters):


That chart munges all the political polls taken this year together, and fits a smooth line between them. But some polls are probably better than others, it's hard to take a truly representative sample of the country, and it's likely that some of the companies running the polls do a better job. So here's the trend across each polling company:

And you can do the same thing looking at each of the smaller parties.

I'm sure there are lots of ways you could improve these charts (let me know if you think of some), but surely they are all more useful than that awful one from The Press?

*It should be pointed out, these thresholds are really indicative rather than absolute. The real cuts with vary depending on how many votes go to parties that don't make the 5% threshold or win an electorate seat and the size of any overhang

The polling data used here is taken from Wikipedia. Contact me if you want a csv file with the dates in an R-friendly format. The stacked bar charts were done manually in Inkscape and all the other plots were done with ggplot then tweaked in Inkscape.

Labels: ,

Posted by David Winter 10:08 AM


Not normally a fan of infographics, but the parliament projection at is pretty good.
i just looked through all your analysis of election stats - quite interesting. better than my approach which is to ignore media diagrams/polls entirely !

Post a Comment