-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
180 lines (177 loc) · 8.94 KB
/
index.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
<html>
<head>
<title>Electoral College Chart</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/Javascript" src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<h1>Electoral Impact</h1>
<p>This page offers data visualizations and comparisons of "vote weight." Due to the way electoral college votes are determined, votes in some states are "worth more" than votes in other states. This page seeks to illustrate those "vote weights".</p>
<hr>
<h2 id="header_comparison">Vote Weight Comparison</h2>
<p>Directly compare weight of a vote in one state versus another.</p>
<div id="comparator">
<p><strong class="embiggened">1 voter</strong> from
<select id="base-state">
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="District of Columbia">District of Columbia</option>
<option value="Florida">Florida</option>
<option value="Georgia">Georgia</option>
<option value="Hawaii">Hawaii</option>
<option value="Idaho">Idaho</option>
<option value="Illinois">Illinois</option>
<option value="Indiana">Indiana</option>
<option value="Iowa">Iowa</option>
<option value="Kansas">Kansas</option>
<option value="Kentucky">Kentucky</option>
<option value="Louisiana">Louisiana</option>
<option value="Maine">Maine</option>
<option value="Maryland">Maryland</option>
<option value="Massachusetts">Massachusetts</option>
<option value="Michigan">Michigan</option>
<option value="Minnesota">Minnesota</option>
<option value="Mississippi">Mississippi</option>
<option value="Missouri">Missouri</option>
<option value="Montana">Montana</option>
<option value="Nebraska">Nebraska</option>
<option value="Nevada">Nevada</option>
<option value="New Hampshire">New Hampshire</option>
<option value="New Jersey">New Jersey</option>
<option value="New Mexico">New Mexico</option>
<option value="New York">New York</option>
<option value="North Carolina">North Carolina</option>
<option value="North Dakota">North Dakota</option>
<option value="Ohio">Ohio</option>
<option value="Oklahoma">Oklahoma</option>
<option value="Oregon">Oregon</option>
<option value="Pennsylvania">Pennsylvania</option>
<option value="Rhode Island">Rhode Island</option>
<option value="South Carolina">South Carolina</option>
<option value="South Dakota">South Dakota</option>
<option value="Tennessee">Tennessee</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
<option value="Vermont">Vermont</option>
<option value="Virginia">Virginia</option>
<option value="Washington">Washington</option>
<option value="West Virginia">West Virginia</option>
<option value="Wisconsin">Wisconsin</option>
<option value="Wyoming">Wyoming</option>
</select>
is worth <strong class="embiggened"><span id="weighted-value">1 voter</span></strong> from
<select id="compared-state">
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="District of Columbia">District of Columbia</option>
<option value="Florida">Florida</option>
<option value="Georgia">Georgia</option>
<option value="Hawaii">Hawaii</option>
<option value="Idaho">Idaho</option>
<option value="Illinois">Illinois</option>
<option value="Indiana">Indiana</option>
<option value="Iowa">Iowa</option>
<option value="Kansas">Kansas</option>
<option value="Kentucky">Kentucky</option>
<option value="Louisiana">Louisiana</option>
<option value="Maine">Maine</option>
<option value="Maryland">Maryland</option>
<option value="Massachusetts">Massachusetts</option>
<option value="Michigan">Michigan</option>
<option value="Minnesota">Minnesota</option>
<option value="Mississippi">Mississippi</option>
<option value="Missouri">Missouri</option>
<option value="Montana">Montana</option>
<option value="Nebraska">Nebraska</option>
<option value="Nevada">Nevada</option>
<option value="New Hampshire">New Hampshire</option>
<option value="New Jersey">New Jersey</option>
<option value="New Mexico">New Mexico</option>
<option value="New York">New York</option>
<option value="North Carolina">North Carolina</option>
<option value="North Dakota">North Dakota</option>
<option value="Ohio">Ohio</option>
<option value="Oklahoma">Oklahoma</option>
<option value="Oregon">Oregon</option>
<option value="Pennsylvania">Pennsylvania</option>
<option value="Rhode Island">Rhode Island</option>
<option value="South Carolina">South Carolina</option>
<option value="South Dakota">South Dakota</option>
<option value="Tennessee">Tennessee</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
<option value="Vermont">Vermont</option>
<option value="Virginia">Virginia</option>
<option value="Washington">Washington</option>
<option value="West Virginia">West Virginia</option>
<option value="Wisconsin">Wisconsin</option>
<option value="Wyoming">Wyoming</option>
</select>.</p>
<div id="comparator-graph">
<div class="row">
<div class="cell"><strong>Voter weight, <span id="com-graph_base-state">State 1</span>:</strong> </div>
<div id="com-graph_base-bar" class="cell com-graph_bar"></div>
</div>
<div class="row">
<div class="cell"><strong>Voter weight, <span id="com-graph_comp-state">State 2</span>:</strong> </div>
<div id="com-graph_comp-bar" class="cell com-graph_bar"></div>
</div>
</div>
<div id="com-buttons">
<p><strong>The following data sets are available for this comparison</strong></p>
<button data-data_set="population">Total State Population</button>
<button data-data_set="votingage">Only Voting Age Voters</button>
<button data-data_set="eligible">Only Eligible Voters</button>
<button data-data_set="turnout">2016 Turnout</button>
<p><em>"Eligible" includes voters of voting age, excluding those who are ineligible because of felony convictions. 2016 "Turnout" numbers are based on current estimates.</em></p>
</div>
</div>
<hr>
<h2 id="header_visualization">Vote Weight Visualization</h2>
<p>This visualization shows the "electoral impact" of each state. The size (width) of each state's box is relative to it's population divided by its electoral college votes. (Technically, each state's box width is determined by the proportion of the state's electoral votes divided by its population relative to the the total electoral votes in the US divided by the US total population, just to be absolutely clear.) Thus, each voter in the larger-impact states could be considered to have "more impact" in the presidential election than the smaller-impact states.</p>
<p>Hover over each state for more inforation. (Note: While the states are colored as they voted in 2016 (Red for Republican, Blue for Democrat), Nebraska and Maine do not commit all their electoral votes to one candidate necessarily.) A <a href="#tabular">table of the data</a> is available below the boxes.</p>
<div id="viz-buttons">
<p><strong>Decide which data to use:</strong></p>
<button data-data_set="population">Total State Population</button>
<button data-data_set="votingage">Only Voting Age Voters</button>
<button data-data_set="eligible">Only Eligible Voters</button>
<button data-data_set="turnout">2016 Turnout</button>
<p><em>"Eligible" includes voters of voting age who, excluding those who are ineligible because of felony convictions. 2016 "Turnout" numbers are based on current estimates.</em></p>
</div>
<div id="container">
</div>
<hr>
<h2 id="header_tabular">Tabular Data</h2>
<table id="tabular">
<thead>
<tr>
<th>State</th>
<th>Electoral College Votes</th>
<th>Population</th>
<th>Population per Electoral Vote</th>
<th>Voting Age Population<br>(percent of total)</th>
<th>Eligible Voting Population<br>(percent of total)</th>
<th>2016 Turnout<br>(percent of eligible)</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<hr>
<p>Created by Chuck Werner. Open source code <a href="https://github.com/mistergone/electoral-charts" target="_blank">is available here</a>. Questions or comments can be sent to "mistergone" on the gmail thing.</p>
</body>
</html>