abiftool parses, converts and analyzes Aggregated Ballot Information File (ABIF).
Project description
abiftool.py
ABIF conversion utility
A script (abiftool.py) which converts between ABIF and other commonly-used electoral expression formats.
Homepage: https://electorama.com/abiftool
Getting started
To try abiftool.py
, perform the following steps:
- Drop to a shell prompt, and change to a directory for a local copy of
abiftool.py
and supporting tests and libraries. - Clone the repo:
git clone https://github.com/electorama/abiftool.git
cd abiftool
- Run an example command (see below)
Examples
Burlington 2009
The following command runs with test data checked into this repository:
./abiftool.py -t texttable testdata/burl2009/burl2009.abif
The expected output is a table with the pairwise output from the election described in burl2009.abif
:
+------------------+----------+------+--------+-------+---------+----------+
+ Loser -> + Montroll | Kiss | Wright | Smith | Simpson | Write-in |
+ v Winner + | | | | | |
+==================+==========+======+========+=======+=========+==========+
+ Montroll (5-0-0) + None | 4067 | 4597 | 4573 | 6267 | 6658 |
+------------------+----------+------+--------+-------+---------+----------+
+ Kiss (4-1-0) + 3477 | None | 4314 | 3946 | 5517 | 6149 |
+------------------+----------+------+--------+-------+---------+----------+
+ Wright (3-2-0) + 3668 | 4064 | None | 3975 | 5274 | 6063 |
+------------------+----------+------+--------+-------+---------+----------+
+ Smith (2-3-0) + 2998 | 3577 | 3793 | None | 5573 | 6057 |
+------------------+----------+------+--------+-------+---------+----------+
+ Simpson (1-4-0) + 591 | 845 | 1309 | 721 | None | 3338 |
+------------------+----------+------+--------+-------+---------+----------+
+ Write-in (0-5-0) + 104 | 116 | 163 | 117 | 165 | None |
+------------------+----------+------+--------+-------+---------+----------+
The table above expresses the same results that can be found in the "Pairwise results" table in the article:
https://electowiki.org/wiki/2009_Burlington_mayoral_election#Pairwise_results
Licensing
abiftool.py is currently licensed under the GNU General Public License version 3 (GPLv3). As of this writing (in February 2024), the primary author can probably be convinced to switch to an MIT, BSD, or Apache license of some sort. Visit electorama/abiftool#1 to discuss this topic.
More info...
More about the formats supported, history of the project, and future plans for abiftool can be found on the homepage for this project: https://electorama.com/abiftool
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file abiftool-0.1.0.tar.gz
.
File metadata
- Download URL: abiftool-0.1.0.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.16.1 CPython/3.11.2 Linux/6.6.30-02725-g3e8c91b46252
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c04d14314f52751105a9e2f6358db71c482c0c380a5dd045e505f09c01025749 |
|
MD5 | 1ed1c20f5f135a209cb76a1a7695d221 |
|
BLAKE2b-256 | f5c8f56d5a75002e664e7fefb1a7e56be3aeb00dc8d2e8cdedb180eaa454ad41 |
File details
Details for the file abiftool-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: abiftool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 45.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.16.1 CPython/3.11.2 Linux/6.6.30-02725-g3e8c91b46252
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e881b4d13f65f582b2d22c00eaf458505684c787b96e8a1e6177d40319d8806 |
|
MD5 | d1d5ff49b6172bf3926528e700e0cf45 |
|
BLAKE2b-256 | ca36f5ff2f33e6ac3606879f01f3698a39fd43c78321e1c0a27fb700544fa0f2 |