election-2015

Some data analysis on the 2015 election result

The data

I used this file from the electoral commission.

Install

pipfile install

The script

pipfile shell
python election.py -- --help
python election.py

Returns something like:

Counter({'total': 650, 'stay home win': 340, '<=10 pc of home win': 56, 'close call (500)': 13, 'close call (250)': 6, 'close call (100)': 3, 'close call (50)': 2})

Run python election.py --show-win-over to get more detail on what fraction of stay at home vote would be needed to change the result. Combine with grep to see things like Conservative seats to target “stay at home” voters.

Run python election.py --show-stay-home to see seats where the stay at home vote was larger than the winning candidate.

Run python election.py --show-close to see information about seats that were narrowly won.

In 2015 13 seats were won by 500 votes or less. 2 were won by 50 or less. #GE2017 #GE2015 #YourVoteMatters

— Simon /\/\e†s0|\| (@drsm79) April 21, 2017