Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.2%) to scientific vocabulary
Repository
Simple Ranked Voting with Schulze and STV
Basic Info
Statistics
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
RankedVote — Simple Ranked Voting with Schulze and STV
RankedVote is a lightweight and easy-to-use Python library for doing ranked-choice elections, with built-in support for:
- Schulze method
- Supports partial ballots and tied rankings
- Single Transferable Vote (STV)
- Supports partial ballots
Installation
You can install directly from GitHub:
bash
pip install git+https://github.com/sneakyHulk/rankedvote.git
Example Usage
```python from rankedvote.methods import schulze, stv from rankedvote.output import output
votes = [ ["E", "F", "B", "A", "D", "G", "H", "I"], ["A", "B", "E", "G", "H"], ["D", "A", "E", "F", "B", "I", "H", "G"], ["E", "I", "B", "A", "D", "F", "G", "H"], ["A", "F", "E", "B", "D", "I", "H", "G"], ["A", "I", "F", "B", "D", "H", "E", "G"], ["A", "B", "E", "D", "F", "I", "G", "H"], ["A", "F", "I", "B", "D", "E", "G", "H"], ["A", "E", "B", "D", "I", "F", "H", "G"], ["I", "B", "D", "E", "F", "G"], ["D", "G", "B", "E", "F", "A", "I", "H"], ["E", "A", "D", "B", "F", "H", "G"], ["A", "I", "F", "B", "D", "G", "H", "E"], ["A", "I", "D", "B", "F", "E", "G", "H"], ["A", "E", "D", "B", "G", "H"], ["D", "I", "E", "F", "A", "B", "G", "H"], ["A", "E", "G", "I", "F", "D", "H", "B"] ]
Schulze Method
print("Schulze:") rankings, positions = schulze(votes) output((rankings, positions))
STV Method
print("STV:") rankings, positions = stv(votes) output((rankings, positions)) ```
Output
text
Schulze:
1. ['A']
2. ['D', 'E']
4. ['I']
5. ['B', 'F', 'G', 'H']
STV:
1. ['A']
2. ['E']
3. ['B']
4. ['D']
5. ['I']
6. ['F']
7. ['G']
8. ['H']
Owner
- Name: Lukas
- Login: sneakyHulk
- Kind: user
- Website: heyn.dev
- Repositories: 1
- Profile: https://github.com/sneakyHulk
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: RankedVote
message: Thanks for using RankedVote - have fun with it!
type: software
authors:
- given-names: Lukas
family-names: Heyn
orcid: 'https://orcid.org/0009-0006-1896-9444'
license: MIT
GitHub Events
Total
- Watch event: 1
- Push event: 1
- Create event: 1
Last Year
- Watch event: 1
- Push event: 1
- Create event: 1
Dependencies
- pyrankvote *
- python3-vote-core *
- setuptools <81