This package calculates the winners of an election using the single transferable vote (STV) voting system.
Issues and Pull Requests are welcome.
Run npm i; typings i
to install dependencies.
Then run npm test
to run the unit tests.
Voting systems is a fascinating area of study that not many people think about. It turns out there are a lot of possible voting systems besides the first-past-the-post voting system commonly used in Western Democracies. Even more interesting, a voting system that is ideally fair in every scenario is provably impossible.
If you want to learn more about STV, the wikipedia page is helpful. C.G.P Grey also has an excellent youtube series on voting that ends with a great explanation of STV.