Skip to content

maxhully/rcv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rcv

Build Status Code Coverage Documentation Status PyPI Package

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([
    ("A", "B", "C"),
    ("A", "C", "B"),
    ("A", "C", "B"),
])

stv = FractionalSTV(schedule, seats=2)
winners = stv.elect()

assert winners == {"A", "C"}

About

A Python package for tabulating ranked-choice elections.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages