JSeats is a java implementation of common electoral seat allocation algorithms.
Questions, bugs and feature requests are welcome on the issues section.
The JSeats library offers a seat allocation processor based on the following simple architecture:
You can have example usages here:
- Majority Method
- Simple (FPTP or First-Past-The-Post)
- Qualified
- Absolute
- Ranked Method
- By votes.
- Equal Proportions Method (aka Huntington-Hill)
- Largest Remainder Method
- Hare
- Droop
- Imperiali
- Highest Averages Method
- D'Hondt
- Sainte-Laguë (Webster)
- Supports user provided first divisor (Modified Sainte-Laguë)
- Imperiali
- Danish
Currently JSeats provides both a clean java API and a command line launcher. A web interface is planned. The command line looks like this:
Usage: JSeats [options]
Options:
-c, --candidate
Add candidate to tally. Candidates follow the format Name:Votes.
-h, --help
Print this message.
Default: false
-ic, --input-config
Configuration input file.
-it, --input-tally
Tally input file. Overrides tally provided in configuration via
--input-config, if any.
-itb, --interactive-tie-breaker
Resolve ties interactively on the console. Overrides --tie-breaker.
Default: false
-ld, --list-decorators
List built-in result decorators.
Default: false
-lf, --list-filters
List built-in tally filters.
Default: false
-lm, --list-methods
List built-in seat allocation methods.
Default: false
-m, --method
Seat allocation method to use. See --list-methods for available methods.
-oc, --output-config
Configuration output file.
-o, --output-result
Result output file.
-ot, --output-tally
Tally output file.
-pv, --potential-votes
Potential votes. If not set, defaults to effective votes (sum of all
casted votes).
Default: -1
-d, --processor-property
Processor properties as in -D numberOfSeats=105.
-tb, --tie-breaker
Resolve ties using provided tie breaker
-v, --verbose
Increase level of verbosity.
Default: false