-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (44 loc) · 2.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ranked Choice Voting</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/rcv.css">
<script src="js/rcv.js"></script>
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body style="margin-top: 24px;">
<div class="container">
<h3>What would the 2020 Democratic Primary look like with ranked choice voting?</h3>
<p>From 9/2 - 9/6 Fairvote enlisted YouGov to poll 1,002 likely Democratic presidential primary voters. How would the primary look with different sets of candidates in the race? Explore results by clicking on any candidate to add or remove them from the running. To find the ranked choice winner, remove the last place candidates until a candidate reaches a 50% majority, or click the button below:</p>
<div style="text-align: center;"><a class="rcv-autoselect button button-primary" href="#">Show me the ranked choice winner</a></div>
</div>
<div id="rcv-interactive" class="container"></div>
<script>
var c20 = "data/us/candidates-20.csv";
var c5 = "data/us/candidates-5.csv";
var results = "data/us/results-yougov.csv";
rcvInitialize({
candidatesCsvUrl: c20,
resultsCsvUrl: results,
headersFormat: "yougov",
weighted: true,
filters: [
[['Everyone', '']],
[['Men', 'gender=1'], ['Women', 'gender=2']],
[['Black voters', 'race=2'], ['Hispanic voters', 'race=3'], ['White voters', 'race=1']],
[['College-educated voters', 'educ=5+6'], ['Non College-educated voters', 'educ=1+2+3+4']],
[['Voters born before 1970', 'birthyr<1970'], ['Voters born 1970 or after', 'birthyr>=1970']]
],
datasets: [[
["Full 20 candidate survey", "20-candidates", {candidatesCsvUrl: c20}],
["Reduced 5 candidate survey", "5-candidates", {candidatesCsvUrl: c5}]
]]
});
</script>
</body>
</html>