thoughtfulbloke/OneVoteTwoVoteRedVoteBlueVote — pull request #3 by jmarshallnz (2014-04-05 05:37:24+00:00)
Title: Poll of polls + plotting

There's a bug fix in here in terms of the number of electorates. Mana was left out (no electorate) and Maori was set to minimum 1. I've changed them to the results from last time.

Also added simulation from the output of the GAM model from @pitakakariki. It's not strictly correct as we don't take into account the dependencies between the proportions we're sampling. To get around this at the moment I've sampled all smaller parties, and then take the largest party (Nats) as the remainder. It doesn't do too badly though - the Nats margin of error increases from 2.0 to 2.5 by doing it this way.

And also added plotting. I'm not that good on the pretty, so if others have ideas I'm happy to look at coding them up. ATM I've just added histograms of the number of seats per party, and a simple scenario analysis (Left/Right/Left+Winston/Right+Winston).

![scenarios](https://cloud.githubusercontent.com/assets/406571/2621987/0764e016-bc83-11e3-85ac-3bc106dbf837.png)
![seats](https://cloud.githubusercontent.com/assets/406571/2621988/076778da-bc83-11e3-9d04-7e99f26169a6.png)