Election graphics

By David Winter 09/11/2011

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.

0 Responses to “Election graphics”

  • Back in late 2010 I advised EQC that one of the charts on their website was wrong. It was a bar chart with the values of each of the bars shown on it – but the values on the bars didn’t match up with where the bars intersected with the y-axis. It was obvious that the chart had been created in Excel and I could see (and replicate) what had gone wrong. I e-mailed EQC offering to help them fix it. They politely declined on the basis that the chart was supposed to be illustrative and the issue was unimportant. They then removed the values from the chart on the website so that you couldn’t compare them to the intersection with the axis.

    I tried!

  • Ha, somehow I think sowing the real data would have been a better way to “illustrate” their point, no matter what it was 🙂

  • The wording about the undecideds on the fairfax graphic is a litte … off. The way I read it they’ve got 14.6% undecided with the rest of the party votes as a proportion of 85.4 percent of voters left over. That would leave National with .85*.52 = 44% of the total vote, Labour with 26% etc….
    I presume it’s just badly worded.

  • Hi Ben,

    I think you’ve got it right, that National have 52% of the decideds.

    It’s really hard to know what to do with undecideds, you can make a good story that they’re left-wing voters deciding between the Greens or Labour, or equally that they’re sitting in the middle and will break right or left in about the same numbers as the rest of the public. It’s also not clear if they’ll actually vote. In the US pollsters ask “likely voter” question to split real undecideds with “will never dicides”.

    Absent any of that information I decided to just exclude the undecideds, though I did make a stacked graph with them too.

  • this a rare case in which a pie chart (or its bastard cousin the torus) might make an effective visualisation

    But there are multiple proportions! There’s the proportion of people who chose National, and the proportion who chose Labour, and so on, and people are very bad at comparing different slices of pie charts. Pie charts are bad unless you’re showing a single proportion as part of a total.

  • Hi Kadin,

    I agree, but I’d argue The Big Message in an election poll is who get’s past 50%, so if you have two large proportions and a bunch of small ones in the middle you might see where the balance of power lies even if you’d struggle to see how the smaller proportions related to the larger ones.

  • Thanks for making the stacked graph with undecided too. It is hard to judge their value in this situation, but I think showing that no one is actually sitting higher than 50% puts things in perspective a little.