{% set winners = resblob['FPTP_result']['winners'] %} {% set winnerstr = ", ".join(winners) %} {% set winnerintro = "FPTP Winners (tie)" if winners | length > 1 else "FPTP Winner" %}
  • {{winnerintro}}: {% if FPTP_candnames %} {%- for winner in winners -%} {{ FPTP_candnames[winner] if winner in FPTP_candnames else winner }}{% if not loop.last %}, {% endif %} {%- endfor -%} {% else %} {{ winnerstr }} {% endif %} {% if winners and resblob.FPTP_result.toppicks %} {% set winner_votes = resblob.FPTP_result.toppicks[winners[0]] %} with {{ "{:,}".format(winner_votes) }} first-place votes ({{ "%0.1f"|format((winner_votes / resblob.FPTP_result.total_votes) * 100) if resblob.FPTP_result.total_votes > 0 else 0 }}%) {% endif %}
  • {% if winners and resblob.FPTP_result.toppicks %} {% set winner_votes = resblob.FPTP_result.toppicks[winners[0]] %} {% set sorted_candidates = resblob.FPTP_result.toppicks|dictsort(reverse=true, by='value') %} {% if sorted_candidates|length > 1 %} {% set runner_up = sorted_candidates[1] %}
  • Runner-up: {{ FPTP_candnames[runner_up[0]] if FPTP_candnames and runner_up[0] in FPTP_candnames else runner_up[0] }} with {{ "{:,}".format(runner_up[1]) }} first-place votes ({{ "%0.1f"|format((runner_up[1] / resblob.FPTP_result.total_votes) * 100) if resblob.FPTP_result.total_votes > 0 else 0 }}%)
  • Margin of victory: {{ "{:,}".format(winner_votes - runner_up[1]) }} votes ({{ "%0.1f"|format(((winner_votes - runner_up[1]) / resblob.FPTP_result.total_votes) * 100) if resblob.FPTP_result.total_votes > 0 else 0 }} percentage points)
  • {% endif %} {% endif %}
  • First-place votes
      {% for candidate, votes in resblob.FPTP_result.toppicks|dictsort(reverse=true, by='value') %}
    • {{ FPTP_candnames[candidate] if FPTP_candnames and candidate in FPTP_candnames else candidate }}: {{ "{:,}".format(votes) }} votes {% if resblob.FPTP_result.total_votes > 0 %} ({{ "%0.1f"|format((votes / resblob.FPTP_result.total_votes) * 100) }} %) {% endif %}
    • {% endfor %}
  • Total ballots: {{ "{:,}".format(resblob.FPTP_result.total_votes) }}