{% for i in range(IRV_dict['rounds'] | length) %} {% endfor %} {% set flags = namespace(overvote=false) %} {% for i in range(IRV_dict['roundmeta'] | length) %} {% endfor %} {% for cand in IRV_dict['rounds'][0] | sort(attribute=IRV_dict['rounds'][0].get, reverse=True) %} {% if cand in winner %} {% set rowclass = "highlight" %} {% else %} {% set rowclass = "" %} {% endif %} {% for round_data in IRV_dict['rounds'][1:] %} {% if cand in winner and (loop.index) == IRV_dict['rounds']|length %} {% elif round_data.get(cand) and IRV_dict['roundmeta'][loop.index] and cand in IRV_dict['roundmeta'][loop.index]['eliminated'] %} {% elif round_data.get(cand) %} {% else %} {% endif %} {% endfor %} {% endfor %}
Round {{ i + 1 }}
Overview:
{% set threshold=IRV_dict['roundmeta'][i]['countedqty'] // 2 + 1 %} Starting ballots: {{IRV_dict['roundmeta'][i]['startingqty'] }}
Exhausted ballots: {{IRV_dict['roundmeta'][i]['exhaustedqty'] }}
{% if IRV_dict['roundmeta'][i]['overvoteqty'] > 0 %} Overvotes: {{IRV_dict['roundmeta'][i]['overvoteqty'] }}
{% set flags.overvote=true %} {% endif %} Counted ballots: {{IRV_dict['roundmeta'][i]['countedqty'] }}
{% if threshold < majority %} Minimum plurality: {{threshold}}
{% endif %} {% if IRV_dict['roundmeta'][i]['bottomtie'] %} TIE(†): {{ IRV_dict['roundmeta'][i]['bottomtie'] | join(", ") }}
{% endif %}
{{ cand }}: {{ IRV_dict['rounds'][0].get(cand, ' ') }}IRV/RCV winner:
{{ cand }}: {{ round_data.get(cand) }}
{{ cand }}: {{ round_data.get(cand) }} {% if IRV_dict['roundmeta'][loop.index]['batch_elim'] %} (batch eliminated †) {% elif cand in IRV_dict['roundmeta'][loop.index]['bottomtie'] %} (randomly eliminated ††) {% else %} (eliminated) {% endif %} {{ cand }}: {{ round_data.get(cand) }}{{ cand }}
{% 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 %}