-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-all-rcv.html
180 lines (179 loc) · 7.32 KB
/
index-all-rcv.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang='en'>
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 5458), see www.w3.org">
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta http-equiv='Cache-Control' content="must-revalidate">
<meta http-equiv='Cache-Control' content="max-age=31535999">
<meta http-equiv='ETag' content="00000002">
<meta name='viewport' content=
'width=device-width, initial-scale=1'>
<meta name='description' content=''>
<meta name='author' content=''>
<title>RCV Results Summary Demo</title>
<!-- Latest compiled and minified CSS-->
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' crossorigin='anonymous'>
<link rel='stylesheet' href='{{ parent_static_url_dir }}styles/doe.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css' integrity='sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==' crossorigin='anonymous' referrerpolicy='no-referrer' />
<link href='https://fonts.googleapis.com/css?family=Rubik' rel='stylesheet'>
<style type="text/css">
body {
font-family: 'Rubik', sans-serif;
font-size: 14px;
padding:20px;
}
.pull-right {
float: right;
}
span.leading-candidate {
color: green;
}
span.election-tooltip {
text-decoration: underline;
}
tfoot > tr:first-child > td {
border-top: 2px solid #ddd;
}
</style>
</head>
<body>
<p>
{{ 'switch_language'|TL(lang='en') -}}
{%- if current_lang != "en" %} ({{ 'switch_language'|TL }})
{%- endif -%}:
{% for lang in iter_languages() %}
{%- if lang.code == current_lang -%}
{{ lang.label|TL(lang=lang.code) }}
{%- else -%}
<a href="{{ lang.page_name }}">{{ lang.label|TL(lang=lang.code) }}
({{ lang.label|TL(lang=current_lang) }})</a>
{%- endif -%}
{%- if not loop.last %} |{% endif %}
{% endfor -%}
<p>
(Note: the purpose of the alternate language pages is to show that the
code supports multiple languages.
At the moment, the RCV tables are only partially translated because
certain phrases like "Continuing Ballots Total" still need to be translated.)
<hr>
<h1>RCV Results Summary Demo</h1>
<p>
This is a demo page for the open-source ranked-choice voting results
reporting code located
<a href="https://github.com/cjerdonek/rcv-results-reporter">here</a>.
The main purpose of this demo is to show the RCV tables.
The text outside of the tables is more for context.
<p>
Last updated: {{ build_time|format_datetime }}
(commit: <code>{{ commit_hash }}</code>))
<h2>Election Index</h2>
<p>
The RCV contests for the past four elections are shown below.
<p>
<ul>
{% for election in elections %}
<li><a href="#{{ election['dir_name'] }}">{{ election['name'] }}</a></li>
{% endfor %}
</ul>
<br>
{% for election in elections %}
<h3>{{ election['name'] }} <a id="{{ election['dir_name'] }}" href="#{{ election['dir_name'] }}">¶</a></h3>
<a href="{{ election['url'] }}" target="_blank">[Original results page]</a>
{% for contest_base, contest, pdf_url in iter_contests(election) %}
{%- set contest_name = contest['_metadata']['contest_name'] %}
{%- set summary_path = get_summary_path(election, contest_base=contest_base) %}
{%- set rounds_url = get_rounds_url(election, contest_base=contest_base) %}
<h4>{{ contest_name }} ({{ 'ranked_choice_voting_contest'|TL }})</h4>
<p>A candidate must receive 50%+1 votes to be elected.
The candidate shaded in green has the most votes based on the total
ballots counted.
The table below shows only the <em>first and last rounds,</em>
if there is more than one round.
The <a href="{{ pdf_url }}" target="_blank">PDF results report</a>
and <a href="{{ rounds_url }}" target="_blank">new HTML results page</a>
for the contest show all rounds.
<a href="https://youtu.be/EF7BomAGch4" target="_blank">Learn how
RCV works.</a></p>
{{- insert_html(summary_path) }}
{%- endfor %}
{% endfor %}
<br>
<div class='row'>
<div class='col-xs-12 col-md-12'>
<h4 id='a_english_46'>Proposition 1 - CONSTITUTIONAL RIGHT TO
REPRODUCTIVE FREEDOM. LEGISLATIVE CONSTITUTIONAL AMENDMENT.</h4>
<a id="displayText46" href=
"javascript:toggle('toggleText46','displayText46','%E2%96%BA%20View%20the%20measure%20text','%E2%96%BC%20View%20the%20measure%20text');">►
View the measure text</a><span id="toggleText46" style=
"display:none">Amends California Constitution to expressly include
an individual’s fundamental right to reproductive freedom, which
includes the fundamental right to choose to have an abortion and
the fundamental right to choose or refuse contraceptives. This
amendment does not narrow or limit the existing rights to privacy
and equal protection under the California Constitution. Fiscal
Impact: No direct fiscal effect because reproductive rights already
are protected by state law.</span><br>
This measure requires 50%+1 affirmative votes statewide to
pass.<br>
<table class='table table-striped table-bordered table-condensed'>
<thead>
<tr>
<th class='col-xs-6 col-md-6' align='left'></th>
<th class='col-xs-3 col-md-3' align='center'>Ballots Counted</th>
<th class='col-xs-3 col-md-3' align='center' data-defaultsort=
'disabled'>Percentage</th>
</tr>
</thead>
<tbody>
<tr>
<td id='candidate'><b><span style=
'color:green;'>Yes</span></b></td>
<td id='votes' align='right' data-value="270509">270,509</td>
<td id='pct' align='right'>89.52%</td>
</tr>
<tr>
<td id='candidate'>No</td>
<td id='votes' align='right' data-value="31657">31,657</td>
<td id='pct' align='right'>10.48%</td>
</tr>
</tbody>
<tfoot>
<tr>
<td id='candidate'><b>Total</b></td>
<td id='votes' align='right'>302,166</td>
<td id='pct' align='right'>100%</td>
</tr>
<tr>
<td>Under Votes</td>
<td align='right'>7,825</td>
<td></td>
</tr>
<tr>
<td>Over Votes</td>
<td align='right'>65</td>
<td></td>
</tr>
</tfoot>
</table>
</div>
</div>
<br>
<!--.col-md-8-->
<!-- end .row-->
<!-- end .container-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins)-->
<script type='text/javascript' src='https://code.jquery.com/jquery-1.11.2.min.js' integrity='sha384-Pn+PczAsODRZ2PiGg0IheRROpP7lXO1NTIjiPo6cca8TliBvaeil42fobhzvZd74' crossorigin='anonymous'></script>
<!-- Latest compiled and minified JavaScript-->
<script src='https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js' integrity='sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r' crossorigin='anonymous'></script>
<script src='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js' integrity='sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+' crossorigin='anonymous'></script>
<script type='text/javascript' src='{{ parent_static_url_dir }}js/jquery.stickytabs.min.js'></script>
<script type='text/javascript' src='{{ parent_static_url_dir }}js/text_hide.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js' integrity='sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ==' crossorigin='anonymous' referrerpolicy='no-referrer'></script>
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
</body>
</html>