Tabulate ballots from ranked-choice elections
Project description
rcv is a Python library for tabulating ballots from ranked-choice elections. The package is distributed under the BSD 3-Clause License.
Examples
from rcv import FractionalSTV, PreferenceSchedule schedule = PreferenceSchedule.from_ballots([ ("Kamala", "Amy", "Elizabeth"), ("Kamala", "Elizabeth", "Amy"), ("Kamala", "Elizabeth", "Amy"), ]) stv = FractionalSTV(schedule, seats=2) winners = stv.elect() assert winners == {"Kamala", "Elizabeth"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size rcv-0.1.2-py3-none-any.whl (8.7 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size rcv-0.1.2.tar.gz (5.7 kB) | File type Source | Python version None | Upload date | Hashes View |