{% for i in range(IRV_dict['rounds'] | length) %} {% endfor %} {% set flags = namespace(overvote=false) %} {% for i in range(IRV_dict['roundmeta'] | length) %} {% set round = IRV_dict['roundmeta'][i] %} {% endfor %} {% for cand in IRV_dict['rounds'][0].keys() %} {% if cand in winner %} {% set rowclass = "highlight" %} {% else %} {% set rowclass = "" %} {% endif %} {% for i in range(IRV_dict['rounds'] | length) %} {% set round_data = IRV_dict['rounds'][i] %} {% set round_meta = IRV_dict['roundmeta'][i] %} {% set colclass = "first-col" if i == 0 else "" %} {% if cand in winner and (i + 1) == numrounds %} {% elif round_data.get(cand) and cand in round_meta.get('eliminated', []) %} {% elif round_data.get(cand) %} {% else %} {% endif %} {% endfor %} {% endfor %}
Round {{ i + 1 }}
Overview:
{% set threshold=round['countedqty'] // 2 + 1 %} Active ballots: {{ "{:,}".format(round['startingqty']) }} ({{ "%.1f"|format((round['startingqty'] / startingqty * 100) if startingqty else 0) }}%)

Exhausted ballots: {{ "{:,}".format(round['exhaustedqty']) }} ({{ "%.1f"|format((round['exhaustedqty'] / startingqty * 100) if startingqty else 0) }}%)
{% if round['overvoteqty'] > 0 %} Overvotes: {{ "{:,}".format(round['overvoteqty']) }} ({{ "%.1f"|format((round['overvoteqty'] / startingqty * 100) if startingqty else 0) }}%)

{% set flags.overvote=true %} {% endif %} Counted ballots: {{ "{:,}".format(round['countedqty']) }} ({{ "%.1f"|format((round['countedqty'] / startingqty * 100) if startingqty else 0) }}%)
{% if threshold < majority %} Winning threshold: {{ "{:,}".format(threshold) }} ({{ "%.2f"|format((threshold / startingqty * 100) if startingqty else 0) }}%)
{% endif %} {% if round['bottomtie'] %} TIE(†): {{ round['bottomtie'] | join(", ") }}
{% endif %}
IRV/RCV winner:
{% if colordict.get(cand) %}{% endif %} {{ IRV_candnames.get(cand, cand) }}: {{ "{:,}".format(round_data.get(cand, 0)) }} ({{ "%.1f"|format((round_data.get(cand, 0) / startingqty * 100) if startingqty else 0) }}%)✅ {% set round = IRV_dict['roundmeta'][i] %} {% if round.transfers or round.next_choices %}
{% endif %}
{% if colordict.get(cand) %}{% endif %} {{ IRV_candnames.get(cand, cand) }}: {{ "{:,}".format(round_data.get(cand, 0)) }} ({{ "%.1f"|format((round_data.get(cand, 0) / startingqty * 100) if startingqty else 0) }}%) {% if round_meta.get('batch_elim') %} (🛑batch eliminated †) {% elif cand in round_meta.get('bottomtie', []) %} (🛑randomly eliminated ††) {% else %} (🛑eliminated) {% endif %} {% set round = IRV_dict['roundmeta'][i] %} {% if round.transfers or round.next_choices %}
{% endif %}
{% if colordict.get(cand) %}{% endif %} {{ IRV_candnames.get(cand, cand) }}: {{ "{:,}".format(round_data.get(cand, 0)) }} ({{ "%.1f"|format((round_data.get(cand, 0) / startingqty * 100) if startingqty else 0) }}%) {% set round = IRV_dict['roundmeta'][i] %} {% if round.transfers or round.next_choices %}
{% endif %}
{% if colordict.get(cand) %}{% endif %} {{ IRV_candnames.get(cand, cand) }}
{% if flags.overvote %}

Overvotes are ballots where multiple candidates are ranked at the same, highest-ranking position.

{% endif %} {% if IRV_dict['has_tie'] %} † - This example employs a limited form "batch elimination", where a batch of multiple candidates who (in sum total) do not have enough remaining top preferences to defeat the next highest candidate in the rankings. †† - When a tie occurs, per the laws in the City and County of San Francisco and the laws in the state of Maine, the losing candidate for the round is randomly eliminated. {% endif %}