Systems
RankChoiceVoting.Borda
— TypeBorda <: VotingSystem
A Borda count voting system object. The Borda count system assigns a score to each vote according to the following rule:
s = n - r + 1
where s is the score, n is the number of candidates and r is the rank. Effectively, the score reverse codes the rank votes.
RankChoiceVoting.compute_ranks
— Methodcompute_ranks(system::Borda, rankings::Ranks)
Ranks candidates using Borda count system.
Arguments
system
: a Borda voting system objectrankings::Ranks
: an object containing counts and unique rank orders
RankChoiceVoting.evaluate_winner
— Methodevaluate_winner(system::Borda, rankings::Ranks)
Returns the id of the winning candiate in Borda count system.
Arguments
system
: a Borda voting system objectrankings::Ranks
: an object containing counts and unique rank orders
RankChoiceVoting.Bucklin
— TypeBucklin <: VotingSystem
A Bucklin voting system object.In the Bucklin voting system, points are added for each candidate in an iterative manner until the point value of a candidate exceeds 50% of the number of voters. In the first round, each candidate recieves a point for each first rank preference. If the candidate with the most points does not exceed 50%, the candidates recieve a point for each second rank vote, and so forth until a candidate exceeds the 50% point threshold.
RankChoiceVoting.compute_ranks
— Methodcompute_ranks(system::Bucklin, rankings::Ranks)
Ranks candidates using the Bucklin system.
Arguments
system
: a Borda voting system objectrankings::Ranks
: an object containing counts and unique rank orders
RankChoiceVoting.evaluate_winner
— Methodevaluate_winner(system::Bucklin, rankings::Ranks)
Returns the id of the winning candiate using the Bucklin voting system.
Arguments
system
: a Bucklin voting system object
RankChoiceVoting.InstantRunOff
— TypeInstantRunOff <: VotingSystem
An instant runoff voting system object.An instant runoff voting system iteratively eliminates the candidate with the minimum first preferences until one canidate reaches 50% first preferences.
RankChoiceVoting.compute_ranks
— Methodcompute_ranks(system::InstantRunOff, rankings::Ranks)
Ranks candidates using the InstantRunOff system.
Arguments
system
: an InstantRunOff voting system objectrankings::Ranks
: an object containing counts and unique rank orders
RankChoiceVoting.evaluate_winner
— Methodevaluate_winner(system::InstantRunOff, rankings::Ranks)
Returns the id of the winning candiate in an instant runoff election.
Arguments
system
: an instant runoff system objectrankings::Ranks
: an object containing counts and unique rank orders