python-vote-core icon indicating copy to clipboard operation
python-vote-core copied to clipboard

Python libraries for various electoral methods

Results 14 python-vote-core issues
Sort by recently updated
recently updated
newest added

There is a small typo in pyvotecore/stv.py. Should read `eliminate` rather than `elimiate`. Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

After installing from pip, get this error when running code below: ``` from pyvotecore.schulze_method import SchulzeMethod from pyvotecore.condorcet import CondorcetHelper ballots = [] SchulzeMethod(ballots, ballot_notation = CondorcetHelper.BALLOT_NOTATION_GROUPING).as_dict() ```

Thanks for the useful code! Is there a way to use your code in order to decide whether there is a Condorcet winner?

presumably copied from Schulze

I wanted to use the module with python 3, but unfortunately it does not work, as far as I can see due to "print ..." instead of "print(...)" in some...

The following Schulze STV election should have two tied winner sets ABC and ABD. However, small floating point errors in the vote management strength computation result in only ABC being...

I just observed an election using this library where the calculation took about an hour to run. We had 105 candidates and rougly 1000 ballots. I'm willing to start to...

In [19]: ballots Out[19]: [{'ballot': [['A'], ['C'], ['D'], ['B']], 'count': 3}, {'ballot': [['B'], ['A'], ['C'], ['D']], 'count': 9}, {'ballot': [['C'], ['D'], ['A'], ['B']], 'count': 8}, {'ballot': [['D'], ['A'], ['B'], ['C']],...

I introduced a function for weighted voting with a St. Lagüe weight function given by 1/(1+2(n-1)) http://www.uv.es/~pla/sistelec/propabga.htm ponderado.py: from abstract_classes import MultipleWinnerVotingSystem from common_functions import matching_keys import types import copy...

``` Traceback (most recent call last): File "test.py", line 28, in pprint(STV(counts).as_dict()) File "/Users/andy/sandboxes/dsf/python-vote-core-20120423.0/pyvotecore/stv.py", line 30, in __init__ super(STV, self).__init__(ballots, tie_breaker=tie_breaker, required_winners=required_winners) File "/Users/andy/sandboxes/dsf/python-vote-core-20120423.0/pyvotecore/abstract_classes.py", line 76, in __init__ super(MultipleWinnerVotingSystem, self).__init__(ballots,...