Metadata-Version: 2.1
Name: rcv
Version: 0.1
Summary: Tabulate ballots from ranked-choice elections
Home-page: https://github.com/gerrymandr/rcv
Author: Max Hully
Author-email: max@mggg.org
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Description-Content-Type: text/x-rst
Provides-Extra: test
Requires-Dist: pandas ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'

===
rcv
===

.. image:: https://travis-ci.com/gerrymandr/rcv.svg?branch=master
    :target: https://travis-ci.com/gerrymandr/rcv
    :alt: Build Status
.. image:: https://codecov.io/gh/gerrymandr/rcv/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/gerrymandr/rcv
    :alt: Code Coverage
.. image:: https://readthedocs.org/projects/rcv-py/badge/?version=latest
    :target: https://rcv-py.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

rcv is a Python library for tabulating ballots from ranked-choice elections.
The package is distributed under the BSD 3-Clause License.

Examples
========

.. code-block:: python

    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"}


