Debunking Uniform Swing… Maybe Next Time…?

A few days ago, I doodled this:

3-way swingometer doodle

The idea was to use a three way swingometer to show the changing fortunes of the three parties with respect to each other in terms of votes cast today compared to 2005, or as input to a visualisation that would allow folk to play around with swings from one party to another (based on election 2005 results) and see the effect on likely allocation of seats this time round. But then I went and did something else

Anyway, via John Naughton just now, I picked up on this post – Labour Danger: Uniform Swing Calculations May Understate Risk to Incumbents – which comments about the dangers of the uniform swing model whose only attraction, as far as I can tell, is that it is “fairly easy to calculate”. Instead, “an alternative approach [is proposed] which, while also based on fairly simple assumptions, is potentially more robust. The approach works by assigning shares of one party’s 2005 vote to another. For instance, what happens if 10 percent of people who voted for Labour in 2005 defect to the Conservatives, 15 percent of Labour’s voters defect to LibDems, and 10 percent of the Conservatives’ voters defect to LibDems?”

Exactly…

I don’t have time today to hack together my three way swingometer thingy, though something similar already exists here:

Swingometer

…but maybe if we get another election after the summer, I’ll hack it together for then…?;-)

PS see also UK General Election 2010 – Interactive Maps and Swingometers.

UK General Election 2010 – Interactive Maps and Swingometers

So it seems like the General Election has been a Good Thing for the news media’s interactive developer teams… Here’s a quick round up of some of the interactives I’ve found…

First up, the BBC’s interactive election seat calculator:

BBC election interactive

This lets you set the percentage vote polled by each party and it will try to predict the outcome…

The Guardian swingometer lets you play with swing from any two of the three big parties to the third:

Guardian swingometer

The Daily Telegraph swingometer lets you look at swing between any two parties…

Telegraph election map

The Economist also lets you explore pairwise swings

Economist - election map

The Times doesn’t really let you do much at all… and I wonder – is Ladbrokes in there as product placement?!

Time election interactive

Sky doesn’t go in for modeling or prediction, it’s more of just a constituency browser

Sky Election Map

The Sun probably has Tiffany, 23…

From elsewhere, this swingometer from the Charts & numbers – UK Election 2010 blog lets you model swings between the various parties

Swingometer

As to what swing is? It’s defined in this Parliamentary briefing doc [PDF]/

Visualising Whether the LibDems Side with the Tories or Labour in Parliamentary Votes

A couple of days ago, I picked up via a post on the Guardian Datablog a cluster map visualisation by the Public Whip folk comparing how MPs from the various parties have voted over the last few Governments: MP vote map (data).

The 2D chart shows clustered voting behaviour in Parliamentary votes ( divisions ) between recent elections, showing who voted with whom (e.g. did the LibDems tend to vote with Labour MPs, or Conservative MPs?).

Ever a literalist, I thought I’d have a crack at the data myself, and plot some simple coloured matrix charts of MPs vs. vote, using colour to denote whether or note the MP voted in favour of the motion, or against it.

So for example, for the 2005-2010 period, I get the following:

The top block shows Labour MPs, then Lib Dems, then Conservative MPs and finally MPs from the other parties. The x-axis is the vote, with (I think) more recent votes to the left; individual MPs go down the y-axis. Looking at a line across the screen gives the voting record for a particular MP; looking at a line going down the screen shows how folk voted on a particular vote.

Where there are long horizontal black lines showing, this is identifies MPs who were absent from votes over that period of time. If you have good eyesight, looking down the votes, we can see whether or not the parties voted the same way. I have put in a little bit of interactivity to allow exploration of the data, but I think it also needs x/y magnification to better show the votes for the selected vote and MP:

To try to make things a little easier to see, here’s a view of the map showing MPs who were marked by the Public Whip as absent from a vote (white is absent);

Hover the mouse cursor over one of the lines shows Tony Blair as being largely absent (as you might expect). A distinct white line going down the screen shows that very few people attended the vote. I need to rethink this interaction, I think, maybe showing the votes that an MP did vote at when you highlight them, and using red/green colour to show how they voted.

The next view attempts to show whether or not a particular MP voted with the majority vote of their party…

So for example, looking across the diagram to find lines (= regular dissenters), I can pick out Jeremy Corbyn, Alan Simpson and Kenneth Clarke, which the Public Whip also sees as voting against the majority view of their party. Where there are significant numbers voting against the majority view of the party, I’m guess that’s a free vote…? Or, err, there’s something a little buggy going on in the code…:-(

The app was written in Processing; for what it’s worth, I posted an edit or two ago of the code code as a gist on github.

PS I just updated the info panel to provide a little bit more detail about how a vote went:

The bottom line shows the turnout for the vote, the overall majority (-ve number means the vote wasn’t passed), then the ayes/noes for each party. If this info doesn’t match the actual vote record, I know I have a bug…:-) (or is that :-(?