thoughtfulbloke/OneVoteTwoVoteRedVoteBlueVote — pull request #2 by jmarshallnz (2014-04-04 23:46:31+00:00)
Title: Ignore parties under threshold + cosmetics

One critical fix: we weren't discounting parties that didn't make the threshold and didn't have an electorate. In particular this effects the Conservatives, thus pushing the results quite a bit in favour of the right (73% versus around 47% now). There's also a small chance of a Labour-led government with the corrected code (0.04%)

The rest is just cleanup, moving the poll stuff out of the internal function.

Next step is adding a routine for sampling from the output from polls of polls.