{# Jinja2 template for pairwise/win-loss-tie table (simple version) #} {% if colordict %} {% endif %}
{% for rk in candtoks %} {% for ck in candtoks %} {% if not loop.last %} {% if candtoks.index(rk) > candtoks.index(ck) %} {% elif rk == ck %} {% else %} {% if candtoks.index(rk) < candtoks.index(ck) %} {% else %} {% endif %} {% endif %} {% endif %} {% endfor %} {% endfor %}
{{ title | e }} pairwise matchups
{{ candnames[rk] }}
({{ "{:,}".format(wltdict[rk]['wins']) }}-{{ "{:,}".format(wltdict[rk]['losses']) }}-{{ "{:,}".format(wltdict[rk]['ties']) }})
{{ candnames[ck] }}: {% set total_votes = pairdict[ck][rk] + pairdict[rk][ck] %} {% set ck_score = pairdict[ck][rk] %} {% set ck_percentage = (ck_score / total_votes * 100) if total_votes > 0 else 0 %} {{ "{:,}".format(ck_score) }}({{ "%.1f"|format(ck_percentage) }}%)
{{ candnames[rk] }}: {% set rk_score = pairdict[rk][ck] %} {% set rk_percentage = (rk_score / total_votes * 100) if total_votes > 0 else 0 %} {{ "{:,}".format(rk_score) }}({{ "%.1f"|format(rk_percentage) }}%){% if not (pairdict[ck][rk] > pairdict[rk][ck]) %}{% endif %}
{{ candnames[rk] }}
{% if is_copeland_tie %} {{ "{:,}".format(wltdict[rk]['losses']) }} loss{{ 'es' if wltdict[rk]['losses'] != 1 else '' }} / {{ "{:,}".format(wltdict[rk]['wins']) }} victor{{ 'y' if wltdict[rk]['wins'] == 1 else 'ies' }} {% elif loop.index0 == 0 %} {{ "{:,}".format(wltdict[rk]['wins']) }} victor{{ 'y' if wltdict[rk]['wins'] == 1 else 'ies' }} ⇣ {% else %} ⇽ {{ "{:,}".format(wltdict[rk]['losses']) }} loss{{ 'es' if wltdict[rk]['losses'] != 1 else '' }} / {{ "{:,}".format(wltdict[rk]['wins']) }} victor{{ 'y' if wltdict[rk]['wins'] == 1 else 'ies' }} ⇣ {% endif %}
{% if is_copeland_tie %}
"Victories" and "losses" sometimes aren't displayed in the expected location when there are ties and/or cycles in the results, but the numbers provided should be accurate.
{% endif %} {% if svg_text %}
{{ svg_text|safe }}
{% endif %}