fivemack: (Default)
Tom Womack ([personal profile] fivemack) wrote2010-05-08 09:04 pm

4056 lines of data

So you don't have to scrape the BBC yourself:

http://www.chiark.greenend.org.uk/~twomack/2010-results.txt

contains 4056 lines of the form

Chelsea & Fulham } Blue Environment Party } 17


The vote-count is blank for all the parties in Thirsk & Malton since that election hasn't happened yet.

The example script here makes the following list of parties standing in more than twenty places:

Party nameNumber of places standing Deposits saved
Socialist Labour Party230
Monster Raving Loony Party270
Trade Unionist and Socialist Coalition380
Plaid Cymru4029
Scottish National Party5959
Christian Party710
English Democrats1071
Independent25013
Green3357
British National Party33872
UK Independence Party55899
Conservative630627
Labour631625
Liberal Democrat631630


(for the curious, the English Democrats kept their deposit in Doncaster North; the Liberal Democrats kept all of theirs but I divided by zero in Thirsk; the Conservatives lost theirs in Na H-Eileanan An Iar and Glasgow East; Philip Lardner stood as an independent in Ayrshire North after being deselected from the Conservatives)
aldabra: (Default)

[personal profile] aldabra 2010-05-08 08:15 pm (UTC)(link)
Oh poor Greens. Losing deposits, losing deposits, who'll come a-losing deposits with me?

[identity profile] helenbr.livejournal.com 2010-05-08 08:35 pm (UTC)(link)
You don't necessarily have to screen scrape the BBC. We've been using the data from the Guardian, which has it available as a Google spreadsheet. We'd been wondering whether Lib Dem swing might be correlated with Lib Dem votes in 2005 (it didn't seem to be).

ext_8103: (Default)

[identity profile] ewx.livejournal.com 2010-05-08 09:26 pm (UTC)(link)
Oh, excellent, I’d been hoping to stumble across a data set like that (not having yet looked very hard l-)

[identity profile] mooism.livejournal.com 2010-05-08 11:18 pm (UTC)(link)
650 seats in the UK, less 18 for NI gives 632 seats in GB, less one for the speaker leaves 631. Leading to the questions of which other 2 seats didn't have a Lib Dem candidate, which 2 didn't have a Labour candidate, and which 3 didn't have a Tory candidate?

[identity profile] beingjdc.livejournal.com 2010-05-09 12:12 am (UTC)(link)
Hello. This is wildly optimistic as I don't think it works very neatly, but it would be useful for me so I'm asking anyway... I don't suppose you have a script which would turn this into a table with the constituencies down the left hand side but the parties across the top, so 649 lines rather than 4000.

I mainly want to work out how closely the central probable outcome of single stochastic vote would resemble the outcome of pure national proportionality - I can do that bit, convert numbers to percentages of total votes, then add the percentages column (correct? I think so).

[identity profile] sesquipedality.livejournal.com 2010-05-09 02:06 pm (UTC)(link)
I think your scrape went a bit wrong. There are only 648 constituencies in it.

[identity profile] meirion.livejournal.com 2010-05-10 08:23 am (UTC)(link)
Good for the Western Isles!

I was safely ensconsed in Highlands and Islands constituency all day Thursday ....
ext_44: (bankformonument)

[identity profile] jiggery-pokery.livejournal.com 2010-05-10 01:57 pm (UTC)(link)
A quick *shoulder bump* to thank you for your public-spirited activity.