VoteKit

VoteKit: A Python package for computational social choice research - Published in JOSS (2025)

https://github.com/mggg/votekit

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

A Swiss Army Knife for computational social choice research

Basic Info
Statistics
  • Stars: 16
  • Watchers: 3
  • Forks: 17
  • Open Issues: 55
  • Releases: 15
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct

README.md

VoteKit

VoteKit is a Swiss army knife for computational social choice research.

Helpful links: Source Repository | Documentation | Issues & Feature Requests | Contributing | MGGG.org

PyPI badge Test badge

Installation

Votekit can be installed through any standard package management tool:

pip install votekit

For more detailed instructions, please see the installation section of the VoteKit documentation.

Example

A simple example of how to use VoteKit to load, clean, and run an election using real data taken from the 2013 Minneapolis Mayoral election. For a more comprehensive walkthrough, see the documentation.

```python from votekit import loadcsv, removenoncands from votekit.elections import STV

minneapolisprofile = loadcsv("mn2013castvoterecord.csv")

clean downloaded file to remove edited aspects of the cast vote record

minneapolisprofile = removenoncands(minneapolis_profile, ["undervote", "overvote", "UWI"])

minnelection = STV(profile = minneapolisprofile, m = 1) minnelection.runelection() ```

                   Candidate     Status  Round
                BETSY HODGES    Elected     35
                 MARK ANDREW Eliminated     34
                 DON SAMUELS Eliminated     33
                  CAM WINTON Eliminated     32
          JACKIE CHERRYHOMES Eliminated     31
                    BOB FINE Eliminated     30
                   DAN COHEN Eliminated     29
          STEPHANIE WOODRUFF Eliminated     28
             MARK V ANDERSON Eliminated     27
                   DOUG MANN Eliminated     26
                  OLE SAVIOR Eliminated     25
               JAMES EVERETT Eliminated     24
           ALICIA K. BENNETT Eliminated     23
  ABDUL M RAHAMAN "THE ROCK" Eliminated     22
        CAPTAIN JACK SPARROW Eliminated     21
           CHRISTOPHER CLARK Eliminated     20
                   TONY LANE Eliminated     19
                JAYMIE KELLY Eliminated     18
                  MIKE GOULD Eliminated     17
             KURTIS W. HANNA Eliminated     16
 CHRISTOPHER ROBIN ZIMMERMAN Eliminated     15
         JEFFREY ALAN WAGNER Eliminated     14
                 NEAL BAXTER Eliminated     13
            TROY BENJEGERDES Eliminated     12
            GREGG A. IVERSON Eliminated     11
            MERRILL ANDERSON Eliminated     10
                  JOSHUA REA Eliminated      9
                   BILL KAHN Eliminated      8
         JOHN LESLIE HARTWIG Eliminated      7
      EDMUND BERNARD BRUYERE Eliminated      6
JAMES "JIMMY" L. STROUD, JR. Eliminated      5
            RAHN V. WORKCUFF Eliminated      4
       BOB "AGAIN" CARNEY JR Eliminated      3
                  CYD GORMAN Eliminated      2
         JOHN CHARLES WILSON Eliminated      1

Issues and Contributing

This project is in active development in the mggg/VoteKit GitHub repository, where bug reports and feature requests, as well as contributions, are welcome.

Currently VoteKit uses poetry to manage the development environment. If you want to make a pull request, first pip install poetry to your computer. Then, within the Votekit directory and with a virtual environment activated, run poetry install This will install all of the development packages you might need. Before making a pull request, run the following: - poetry run pytest tests to check the test suite, - poetry run black . to format your code, - poetry run ruff check src tests to check the formatting, and then - poetry run mypy src to ensure that your typesetting is correct.

Then you can create your PR! Please do not make your PR against main.

Owner

  • Name: Metric Geometry and Gerrymandering Group
  • Login: mggg
  • Kind: organization
  • Email: engineering@mggg.org
  • Location: Boston, MA

A nonpartisan research organization studying applications of geometry and computing to U.S. redistricting. See also @mggg-states for data and @gerrymandr.

JOSS Publication

VoteKit: A Python package for computational social choice research
Published
May 15, 2025
Volume 10, Issue 109, Page 7477
Authors
Christopher Donnay ORCID
Cornell University, United States
Moon Duchin ORCID
Cornell University, United States
Jack Gibson
MGGG Redistricting Lab, United States
Zach Glaser
MGGG Redistricting Lab, United States
Andrew Hong
Stanford University, United States
Malavika Mukundan ORCID
Boston University, United States
Jennifer Wang ORCID
Brown University, United States
Editor
Britta Westner ORCID

GitHub Events

Total
  • Create event: 43
  • Release event: 3
  • Issues event: 83
  • Watch event: 1
  • Delete event: 33
  • Member event: 2
  • Issue comment event: 81
  • Push event: 308
  • Pull request review comment event: 164
  • Pull request event: 82
  • Pull request review event: 104
  • Fork event: 5
Last Year
  • Create event: 43
  • Release event: 3
  • Issues event: 83
  • Watch event: 1
  • Delete event: 33
  • Member event: 2
  • Issue comment event: 81
  • Push event: 309
  • Pull request review comment event: 164
  • Pull request event: 82
  • Pull request review event: 104
  • Fork event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 78
  • Total pull requests: 193
  • Average time to close issues: 4 months
  • Average time to close pull requests: 17 days
  • Total issue authors: 11
  • Total pull request authors: 22
  • Average comments per issue: 0.41
  • Average comments per pull request: 0.54
  • Merged pull requests: 127
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 54
  • Pull requests: 50
  • Average time to close issues: 21 days
  • Average time to close pull requests: 5 days
  • Issue authors: 6
  • Pull request authors: 10
  • Average comments per issue: 0.37
  • Average comments per pull request: 0.42
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cdonnay (40)
  • peterrrock2 (11)
  • jgibson517 (10)
  • jamesturk (7)
  • EdouardHeitzmann (3)
  • gabeschoenbach (2)
  • edelanuez (1)
  • Drew-Penrose (1)
  • ziglaser (1)
  • tratliff (1)
  • WillithG (1)
Pull Request Authors
  • cdonnay (92)
  • jgibson517 (21)
  • peterrrock2 (14)
  • bmacias01 (12)
  • MalavikaMukundan (9)
  • jamesturk (9)
  • jennjwang (8)
  • kevin-q2 (6)
  • ziglaser (4)
  • edelanuez (3)
  • gabeschoenbach (2)
  • andrewmhong (2)
  • wkirby (2)
  • gkehne (1)
  • koushikswarna (1)
Top Labels
Issue Labels
enhancement (8) refactor (3) good first issue (2) feature request (1) bug (1) documentation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 97 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 16
  • Total maintainers: 5
pypi.org: votekit

A Swiss army knife for computational social choice research.

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 97 Last month
Rankings
Dependent packages count: 7.5%
Average: 38.6%
Dependent repos count: 69.6%
Last synced: 6 months ago

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • snok/install-poetry v1.3.3 composite
poetry.lock pypi
  • black 23.3.0 develop
  • cfgv 3.3.1 develop
  • click 8.1.3 develop
  • colorama 0.4.6 develop
  • coverage 7.2.7 develop
  • distlib 0.3.6 develop
  • exceptiongroup 1.1.1 develop
  • filelock 3.12.2 develop
  • identify 2.5.24 develop
  • iniconfig 2.0.0 develop
  • nodeenv 1.8.0 develop
  • packaging 23.1 develop
  • pathspec 0.11.1 develop
  • platformdirs 3.8.0 develop
  • pluggy 1.2.0 develop
  • pre-commit 3.3.3 develop
  • pytest 7.4.0 develop
  • pytest-cov 4.1.0 develop
  • pyyaml 6.0 develop
  • ruff 0.0.275 develop
  • setuptools 68.0.0 develop
  • virtualenv 20.23.1 develop
  • mypy 1.4.1
  • mypy-extensions 1.0.0
  • numpy 1.25.0
  • pandas 2.0.2
  • pandas-stubs 2.0.2.230605
  • pydantic 1.10.9
  • python-dateutil 2.8.2
  • pytz 2023.3
  • six 1.16.0
  • tomli 2.0.1
  • types-pytz 2023.3.0.0
  • typing-extensions 4.6.3
  • tzdata 2023.3
pyproject.toml pypi
  • mypy ^1.4.1
  • pandas ^2.0.2
  • pandas-stubs ^2.0.2.230605
  • pydantic ^1.10.9
  • python ^3.9