Skip to content
counts Australian Senate single transferable vote elections, parsing AEC provided data files
Python HTML Shell CSS
Branch: master
Clone or download
Latest commit 4c40493 Jun 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
angular replace angrygoats Jun 18, 2019
dividebatur-aec @ d905374 submodule Jun 18, 2019
dividebatur add support for 2019 senate count Jun 11, 2019
docs Fix count definition for SA Aug 2, 2016
incoming initial checkin to public repo Jan 9, 2014
legislation include the legislation in the repo Aug 2, 2016
profile add AEC data as a submodule Jul 8, 2018
templates some more small cleanups Jan 11, 2014
.gitattributes disable git-lfs Jul 8, 2018
.gitignore remove LFS mention from the docs Jul 8, 2018
.gitmodules add AEC data as a submodule Jul 8, 2018
.travis.yml replace angrygoats Jun 18, 2019
AUTHORS replace angrygoats Jun 18, 2019
CHANGELOG.md add generated changelog Nov 5, 2016
LICENSE initial checkin to public repo Jan 9, 2014
README.md replace angrygoats Jun 18, 2019
run_aec_fed2013.sh add AEC data as a submodule Jul 8, 2018
run_aec_fed2013_wa.sh add AEC data as a submodule Jul 8, 2018
run_aec_fed2016.sh add AEC data as a submodule Jul 8, 2018
run_aec_fed2019.sh add support for 2019 senate count Jun 11, 2019
setup.py replace angrygoats Jun 18, 2019
travis_setup.sh
travis_tests.sh add AEC data as a submodule Jul 8, 2018

README.md

dividebatur: process single-transferable-vote elections as used for the Australian Senate under the Commonwealth Electoral Act (1918)

For a high level overview of what this does, check this blog post:

https://oreamnos.com.au/posts/counting-the-wa-election/

For the legislation defining the system we are implementing, see the legislation directory of the repository. The counting algorithm is defined in Section 273. Other sections define the rules around formality of ballots.

Build status

Build Status

License

Copyright 2013-16, The Dividebatur Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

See the file AUTHORS for a list of contributors to this software project.

Dependencies

For Ubuntu:

Optional to run tests

$ sudo apt-get install python3-pip
$ pip3 install flake8
$ pip3 install nose

Contributing

Contributions are welcomed, please feel free to send in pull requests.

Please abide by The Rust Code of Conduct when contributing to or otherwise engaging this project.

Please check that the tests pass before committing. See travis_tests.sh in the root of the repository. This includes a lint pass, running flake8 --ignore=E501 dividebatur. Make sure you've got flake8 installed for python3 (you should only need to run pip3 install flake8.)

Of course, if there is a bug in the tests, please correct the tests and include in the PR.

Right now there are fairly minimal unit tests, written using nose. It's a goal to increase the coverage of unit tests.

There are quite a few functional tests, checking that known-correct election results don't vary. These do pick up quite a few regressions, but could certainly be improved.

Usage

./run_aec_fed2013_wa.sh will run a count of the 2013/14 WA Senate count . The data is in the repository under dividebatur-aec/fed2013_wa.

./run_aec_fed2016.sh will run a count for all states with data available, for the 2016 federal election. The data is in the repository under dividebatur-aec/fed2016.

Structure

senatecount.py builds up the initial data needed to begin the count, and then hands it to counter.py

counter.py processes the vote. Note it may require user input to break ties which occur choosing a candidate to exclude, choosing the order of election, or choosing the final candidate elected.

You can’t perform that action at this time.