Skip to content

Main content

Ballot Rank Gap Token Tool

Inspect supplied ballot ranks without determining a jurisdiction’s ballot validity.

Loading tool…

Description

Inspect supplied ballot ranks without determining a jurisdiction’s ballot validity.

Election and representation indicators depend on the selected vote, seat, population, or eligibility denominator. A threshold also needs an explicit equality and rounding rule. A single quotient, balance, or share can support a larger counting workflow without implementing the full electoral procedure.

Inspect supplied ballot ranks without determining a jurisdiction’s ballot validity.

When to use this tool

Use Ballot Rank Gap Token when you need this particular counting term under an explicit vote, seat, threshold, or reporting-base rule.

How to use the tool and how it works

  1. Enter firstRank, secondRank, tiedAllowed. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read gap, tie, permittedUnderTiePolicy. Inspect tie, permittedUnderTiePolicy before interpreting the associated values.

For positive integer firstRank and secondRank return gap=secondRank-firstRank, tie=(firstRank===secondRank), and permittedUnderTiePolicy when ranks differ or tiedAllowed is true.1

Input fieldMeaning and unitsAccepted input
firstRankFirst RankRequired. Safe integer; minimum 1.
secondRankSecond RankRequired. Safe integer; minimum 1.
tiedAllowedTied AllowedRequired. Boolean.
Output fieldInterpretationReturned shape
gapSigned difference under the stated formula and measurement unit.Required. Safe integer.
tieTieRequired. Boolean.
permittedUnderTiePolicyPermitted Under Tie PolicyRequired. Boolean.
json
{
  "input": {
    "firstRank": 2,
    "secondRank": 4,
    "tiedAllowed": false
  },
  "output": {
    "gap": 2,
    "tie": false,
    "permittedUnderTiePolicy": true
  }
}

Limitations and assumptions

  • A permitted pair is not a valid complete ballot. Candidate identity, missing ranks, rank limits, and jurisdictional rules are not checked.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.

Alternative or Complementary methods

Compare the supplied counting rule with the authoritative procedure for the relevant election or chamber. Complete allocations need additional eligibility, ranking, transfer, tie, and reporting rules beyond one arithmetic term.

References

  1. Calculation and input contract: political-science/ballot-rank-gap-token — tool.io

Similar or alternative tools