docs | ||
html | ||
pyRCV2 | ||
tests | ||
.coveragerc | ||
.gitignore | ||
build.sh | ||
COPYING | ||
README.md | ||
requirements.txt |
pyRCV2
pyRCV2 is an application for counting various preferential voting elections.
pyRCV2 may be used in a number of different ways:
- as an online web application, no installation or special software required, at https://yingtongli.me/rcv/
- as a standalone Python command line application
- as a library within another Python application
Features
pyRCV2 accepts data in the BLT file format, and can count votes using:
- weighted inclusive Gregory STV (e.g. Scottish STV)
- unweighted inclusive Gregory STV (e.g. Australian Senate STV)
- exclusive Gregory STV (e.g. PRSA 1977 and ERS97)
- Meek STV – with tree-packed ballots for efficient computation
- Wright STV
pyRCV2 is highly customisable, including options for:
- different quotas and quota rules (e.g. exact Droop, Hare) or progressively reducing quota
- calculations using fixed-point arithmetic, guarded fixed-point (quasi-exact) or exact rational numbers
- different tie breaking rules (backwards, random, manual) with auditable deterministic random number generation
- multiple constraints (e.g. affirmative action rules)
- extensible API for other counting methods
Online usage
After preparing the BLT file, head to https://yingtongli.me/rcv/. Select the BLT file, and click Count. pyRCV2 will count the election and display the results in a count sheet. See here for more detailed instructions.
By clicking Show advanced options, you can customise the options used for the count. A detailed explanation of the various options can be found here.
Once the count is complete, you can click Print result to generate a printable result report.
Command line usage
pyRCV2 may also be invoked as a command line application. Run python -m pyRCV2 --help
to view help.
For example, run python -m pyRCV2 stv path/to/blt_file.blt --ties backwards --ties random --random-seed foobar
.