<!DOCTYPE html>
<html class="zc-html">
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
<style>
.zc-html,
.zc-body {
background-color: #FFF;
font-family: "Roboto Condensed";
}
.chart--container {
min-height: 530px;
width: 100%;
height: 100%;
}
#myChart {
clear: both;
}
.zc-ref {
display: none;
}
#title {
background-color: #333;
color: #FFF;
height: 40px;
line-height: 40px;
margin: 0px 0px 10px;
position: relative;
text-align: center;
width: 100%;
}
#year {
float: left;
font-size: 24px;
margin-left: 200px;
width: 60px;
}
#president {
float: left;
font-size: 24px;
font-weight: 300;
width: 250px;
}
#timeMachine {
float: left;
width: calc(100% - 105px);
height: 30px;
}
button {
cursor: pointer;
background-color: #333;
border-radius: 50%;
color: #FFF;
border: none;
margin: 0px 10px;
float: left;
width: 30px;
height: 30px;
}
button:hover {
background-color: #000;
}
button:focus {
outline: none;
}
input[type=range] {
-webkit-appearance: none;
}
input[type=range]:focus {
outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
background: #333333;
border: 0.2px solid #010101;
border-radius: 1.3px;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
cursor: pointer;
width: 100%;
height: 1.2px;
}
input[type=range]::-webkit-slider-thumb {
background: #ffffff;
border: 1px solid #000000;
border-radius: 3px;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
cursor: pointer;
margin-top: -11.6px;
-webkit-appearance: none;
width: 13px;
height: 24px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
background: #404040;
}
input[type=range]::-moz-range-track {
border: 0.2px solid #010101;
background: #333333;
border-radius: 1.3px;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
cursor: pointer;
width: 100%;
height: 1.2px;
}
input[type=range]::-moz-range-thumb {
background: #ffffff;
border: 1px solid #000000;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
border-radius: 3px;
cursor: pointer;
width: 13px;
height: 24px;
}
input[type=range]::-ms-track {
background: transparent;
border-color: transparent;
color: transparent;
cursor: pointer;
width: 100%;
height: 1.2px;
}
input[type=range]::-ms-fill-lower {
background: #262626;
border: 0.2px solid #010101;
border-radius: 2.6px;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}
input[type=range]::-ms-fill-upper {
background: #333333;
border: 0.2px solid #010101;
border-radius: 2.6px;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}
input[type=range]::-ms-thumb {
background: #ffffff;
border: 1px solid #000000;
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
border-radius: 3px;
cursor: pointer;
height: 1.2px;
width: 13px;
height: 24px;
}
input[type=range]:focus::-ms-fill-lower {
background: #333333;
}
input[type=range]:focus::-ms-fill-upper {
background: #404040;
}
#party {
border-radius: 50%;
float: left;
font-size: 20px;
line-height: 24px;
margin-top: 8px;
margin-left: 10px;
text-align: center;
width: 24px;
height: 24px;
}
.rep {
background-color: #DC1A21;
}
.tsm.dem {
background-color: #00AEF3;
}
#play {
color: #7CA82B;
cursor: pointer;
font-size: 32px;
left: 19px;
line-height: 32px;
position: absolute;
top: 5px;
}
#play:hover {
color: #a2dc38;
}
</style>
</head>
<body class="zc-body">
<div class="tsm">
<p id="title">
<span id="play"><i class="fa fa-play"></i></span><span id="year"></span><span id="president"></span><span id="party" class="rep"></span>
</p>
<button type="button" id="prev"><i class="fa fa-arrow-left"></i></button>
<input type="range" id="timeMachine" min="0" max="36" value="0">
<button type="button" id="next"><i class="fa fa-arrow-right"></i></button>
<div id="myChart" class="chart--container">
<a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
</div>
</div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // DEFINE DATA
// -----------------------------
let electionResults = [{
name: 'AL',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'AK',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'AZ',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'AR',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'CA',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'CO',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'I',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'CT',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'DE',
results: [{
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'FL',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'GA',
results: [{
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'HI',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'ID',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'IL',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'IN',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}]
}, {
name: 'IA',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'KS',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'I',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'KY',
results: [{
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'LA',
results: [{
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'ME',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'MD',
results: [{
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'MA',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'MI',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'MN',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'MS',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'MO',
results: [{
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'MT',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'NE',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'NV',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'I',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'NH',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'NJ',
results: [{
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'NM',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'NY',
results: [{
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'NC',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}]
}, {
name: 'ND',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'OH',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'OK',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'OR',
results: [{
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'PA',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'RI',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'SC',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'SD',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'TN',
results: [{
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'TX',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'UT',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'VT',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'VA',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'WA',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'WV',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}, {
name: 'WI',
results: [{
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'I',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}]
}, {
name: 'WY',
results: [{
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'NONE',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'D',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: true
}, {
vote: 'R',
won: false
}, {
vote: 'R',
won: false
}]
}];
let presidents = [{
name: 'UlyssesS.Grant',
party: 'Republican'
}, {
name: 'UlyssesS.Grant',
party: 'Republican'
}, {
name: 'RutherfordB.Hayes',
party: 'Republican'
}, {
name: 'JamesA.Garfield',
party: 'Republican'
}, {
name: 'GroverCleveland',
party: 'Democratic'
}, {
name: 'BenjaminHarrison',
party: 'Republican'
}, {
name: 'GroverCleveland',
party: 'Democratic'
}, {
name: 'WilliamMcKinley',
party: 'Republican'
}, {
name: 'WilliamMcKinley',
party: 'Republican'
}, {
name: 'TheodoreRoosevelt',
party: 'Republican'
}, {
name: 'WilliamHowardTaft',
party: 'Republican'
}, {
name: 'WoodrowWilson',
party: 'Democratic'
}, {
name: 'WoodrowWilson',
party: 'Democratic'
}, {
name: 'WarrenG.Harding',
party: 'Republican'
}, {
name: 'CalvinCoolidge',
party: 'Republican'
}, {
name: 'HerbertHoover',
party: 'Republican'
}, {
name: 'FranklinD.Roosevelt',
party: 'Democratic'
}, {
name: 'FranklinD.Roosevelt',
party: 'Democratic'
}, {
name: 'FranklinD.Roosevelt',
party: 'Democratic'
}, {
name: 'FranklinD.Roosevelt',
party: 'Democratic'
}, {
name: 'HarryS.Truman',
party: 'Democratic'
}, {
name: 'DwightD.Eisenhower',
party: 'Republican'
}, {
name: 'DwightD.Eisenhower',
party: 'Republican'
}, {
name: 'JohnF.Kennedy',
party: 'Democratic'
}, {
name: 'LyndonB.Johnson',
party: 'Democratic'
}, {
name: 'RichardNixon',
party: 'Republican'
}, {
name: 'RichardNixon',
party: 'Republican'
}, {
name: 'JimmyCarter',
party: 'Democratic'
}, {
name: 'RonaldReagan',
party: 'Republican'
}, {
name: 'RonaldReagan',
party: 'Republican'
}, {
name: 'GeorgeH.W.Bush',
party: 'Republican'
}, {
name: 'BillClinton',
party: 'Democratic'
}, {
name: 'BillClinton',
party: 'Democratic'
}, {
name: 'GeorgeW.Bush',
party: 'Republican'
}, {
name: 'GeorgeW.Bush',
party: 'Republican'
}, {
name: 'BarackObama',
party: 'Democratic'
}, {
name: 'BarackObama',
party: 'Democratic'
}];
// HELPER METHODS
// -----------------------------
let setResults = (index) => {
year.innerText = 1868 + index * 4;
president.innerText = presidents[index].name;
if (presidents[index].party === 'Democratic') {
party.innerText = 'D';
party.classList.remove('rep');
party.classList.add('dem');
} else {
party.innerText = 'R';
party.classList.remove('dem');
party.classList.add('rep');
}
let stateResults = {};
electionResults.forEach((state) => {
let stateName = state.name;
let styleObject = {
'backgroundColor': (state.results[index].vote == 'D' ? '#00AEF3' : (state.results[index].vote == 'R' ? '#DC1A21' : (state.results[index].vote == 'I' ? '#fac82f' : '#ddd'))),
};
stateResults[stateName] = styleObject;
});
// CHART CONFIG
// -----------------------------
let chartConfig = {
globals: {
fontFamily: 'Roboto Condensed',
shadow: false
},
backgroundColor: '#FFF',
labels: [{
text: 'Republican',
fontSize: '12px',
x: '100px',
y: '0px'
},
{
text: 'Democrat',
fontSize: '12px',
x: '200px',
y: '0px'
},
{
text: 'Third Party',
fontSize: '12px',
x: '300px',
y: '0px'
}
],
shapes: [{
type: 'circle',
backgroundColor: '#DC1A21',
size: '8px',
x: '90px',
y: '10px'
},
{
type: 'circle',
backgroundColor: '#00AEF3',
size: '8px',
x: '190px',
y: '10px'
},
{
type: 'circle',
backgroundColor: '#fac82f',
size: '8px',
x: '290px',
y: '10px'
},
{
type: 'zingchart.maps',
options: {
id: 'map',
name: 'usa',
scale: true,
style: {
borderColor: '#FFF',
hoverState: {
visible: false
},
items: stateResults
}
}
}
]
};
return chartConfig;
};
// RENDER CHARTS
// -----------------------------
zingchart.loadModules('maps,maps-usa,patterns');
zingchart.render({
id: 'myChart',
data: setResults(0)
});
// EVENTS
// -----------------------------
let isPlaying = false;
// input event trigger
let event = document.createEvent('Event');
event.initEvent('input', true, true);
timeMachine.addEventListener('input', function() {
let index = this.value;
let newData = setResults(index);
zingchart.exec('myChart', 'setdata', {
data: newData
});
});
prev.addEventListener('click', function() {
timeMachine.stepDown(1);
timeMachine.dispatchEvent(event);
});
next.addEventListener('click', function() {
timeMachine.stepUp(1);
timeMachine.dispatchEvent(event);
});
play.addEventListener('click', function() {
if (!isPlaying) {
isPlaying = true;
this.innerHTML = '<i class=\'fa fa-pause\'></i>';
let ticks = presidents.length;
let counter = parseInt(timeMachine.value);
window.historyPlayer = setInterval(function() {
if (counter < ticks) {
timeMachine.stepUp(1);
timeMachine.dispatchEvent(event);
counter += 1;
if (counter == ticks - 1) {
play.innerHTML = '<i class=\'fa fa-play\'></i>';
}
} else {
isPlaying = false;
clearInterval(window.historyPlayer);
}
}, 1200);
} else {
clearInterval(window.historyPlayer);
isPlaying = false;
this.innerHTML = '<i class=\'fa fa-play\'></i>';
}
});
</script>
</body>
</html>
// DEFINE DATA
// -----------------------------
let electionResults = [{name: 'AL', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'I', won: false}, {vote: 'R', won: false}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'AK', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'AZ', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'AR', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'CA', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'CO', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'I', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'CT', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'DE', results: [{vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'FL', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'GA', results: [{vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'HI', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'ID', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'I', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'IL', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'IN', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}]}, {name: 'IA', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'KS', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'I', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'KY', results: [{vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'LA', results: [{vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'ME', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'MD', results: [{vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'MA', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'MI', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'MN', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'MS', results: [{vote: 'NONE', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'I', won: false}, {vote: 'R', won: false}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'MO', results: [{vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'MT', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'NE', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'NV', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'I', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'NH', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'NJ', results: [{vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'NM', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'NY', results: [{vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'NC', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}]}, {name: 'ND', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'OH', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'OK', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'OR', results: [{vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'PA', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'RI', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'SC', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'SD', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'TN', results: [{vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'TX', results: [{vote: 'NONE', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'UT', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'VT', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'VA', results: [{vote: 'NONE', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'WA', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'WV', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}, {name: 'WI', results: [{vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'I', won: false}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: false}, {vote: 'D', won: false}, {vote: 'D', won: true}, {vote: 'D', won: true}]}, {name: 'WY', results: [{vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'NONE', won: false}, {vote: 'R', won: false}, {vote: 'D', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'D', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'D', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}, {vote: 'R', won: true}, {vote: 'R', won: true}, {vote: 'R', won: false}, {vote: 'R', won: false}]}];
let presidents = [{name: 'UlyssesS.Grant', party: 'Republican'}, {name: 'UlyssesS.Grant', party: 'Republican'}, {name: 'RutherfordB.Hayes', party: 'Republican'}, {name: 'JamesA.Garfield', party: 'Republican'}, {name: 'GroverCleveland', party: 'Democratic'}, {name: 'BenjaminHarrison', party: 'Republican'}, {name: 'GroverCleveland', party: 'Democratic'}, {name: 'WilliamMcKinley', party: 'Republican'}, {name: 'WilliamMcKinley', party: 'Republican'}, {name: 'TheodoreRoosevelt', party: 'Republican'}, {name: 'WilliamHowardTaft', party: 'Republican'}, {name: 'WoodrowWilson', party: 'Democratic'}, {name: 'WoodrowWilson', party: 'Democratic'}, {name: 'WarrenG.Harding', party: 'Republican'}, {name: 'CalvinCoolidge', party: 'Republican'}, {name: 'HerbertHoover', party: 'Republican'}, {name: 'FranklinD.Roosevelt', party: 'Democratic'}, {name: 'FranklinD.Roosevelt', party: 'Democratic'}, {name: 'FranklinD.Roosevelt', party: 'Democratic'}, {name: 'FranklinD.Roosevelt', party: 'Democratic'}, {name: 'HarryS.Truman', party: 'Democratic'}, {name: 'DwightD.Eisenhower', party: 'Republican'}, {name: 'DwightD.Eisenhower', party: 'Republican'}, {name: 'JohnF.Kennedy', party: 'Democratic'}, {name: 'LyndonB.Johnson', party: 'Democratic'}, {name: 'RichardNixon', party: 'Republican'}, {name: 'RichardNixon', party: 'Republican'}, {name: 'JimmyCarter', party: 'Democratic'}, {name: 'RonaldReagan', party: 'Republican'}, {name: 'RonaldReagan', party: 'Republican'}, {name: 'GeorgeH.W.Bush', party: 'Republican'}, {name: 'BillClinton', party: 'Democratic'}, {name: 'BillClinton', party: 'Democratic'}, {name: 'GeorgeW.Bush', party: 'Republican'}, {name: 'GeorgeW.Bush', party: 'Republican'}, {name: 'BarackObama', party: 'Democratic'}, {name: 'BarackObama', party: 'Democratic'}];
// HELPER METHODS
// -----------------------------
let setResults = (index) => {
year.innerText = 1868 + index * 4;
president.innerText = presidents[index].name;
if (presidents[index].party === 'Democratic') {
party.innerText = 'D';
party.classList.remove('rep');
party.classList.add('dem');
} else {
party.innerText = 'R';
party.classList.remove('dem');
party.classList.add('rep');
}
let stateResults = {};
electionResults.forEach((state) => {
let stateName = state.name;
let styleObject = {
'backgroundColor': (state.results[index].vote == 'D' ? '#00AEF3' : (state.results[index].vote == 'R' ? '#DC1A21' : (state.results[index].vote == 'I' ? '#fac82f' : '#ddd'))),
};
stateResults[stateName] = styleObject;
});
// CHART CONFIG
// -----------------------------
let chartConfig = {
globals: {
fontFamily: 'Roboto Condensed',
shadow: false
},
backgroundColor: '#FFF',
labels: [
{
text: 'Republican',
fontSize: '12px',
x: '100px',
y: '0px'
},
{
text: 'Democrat',
fontSize: '12px',
x: '200px',
y: '0px'
},
{
text: 'Third Party',
fontSize: '12px',
x: '300px',
y: '0px'
}
],
shapes: [
{
type: 'circle',
backgroundColor: '#DC1A21',
size: '8px',
x: '90px',
y: '10px'
},
{
type: 'circle',
backgroundColor: '#00AEF3',
size: '8px',
x: '190px',
y: '10px'
},
{
type: 'circle',
backgroundColor: '#fac82f',
size: '8px',
x: '290px',
y: '10px'
},
{
type: 'zingchart.maps',
options: {
id: 'map',
name: 'usa',
scale: true,
style: {
borderColor: '#FFF',
hoverState: {
visible: false
},
items: stateResults
}
}
}
]
};
return chartConfig;
};
// RENDER CHARTS
// -----------------------------
zingchart.loadModules('maps,maps-usa,patterns');
zingchart.render({
id: 'myChart',
data: setResults(0)
});
// EVENTS
// -----------------------------
let isPlaying = false;
// input event trigger
let event = document.createEvent('Event');
event.initEvent('input', true, true);
timeMachine.addEventListener('input', function() {
let index = this.value;
let newData = setResults(index);
zingchart.exec('myChart', 'setdata', {
data: newData
});
});
prev.addEventListener('click', function() {
timeMachine.stepDown(1);
timeMachine.dispatchEvent(event);
});
next.addEventListener('click', function() {
timeMachine.stepUp(1);
timeMachine.dispatchEvent(event);
});
play.addEventListener('click', function() {
if (!isPlaying) {
isPlaying = true;
this.innerHTML = '<i class=\'fa fa-pause\'></i>';
let ticks = presidents.length;
let counter = parseInt(timeMachine.value);
window.historyPlayer = setInterval(function() {
if (counter < ticks) {
timeMachine.stepUp(1);
timeMachine.dispatchEvent(event);
counter += 1;
if (counter == ticks - 1) {
play.innerHTML = '<i class=\'fa fa-play\'></i>';
}
}
else {
isPlaying = false;
clearInterval(window.historyPlayer);
}
}, 1200);
}
else {
clearInterval(window.historyPlayer);
isPlaying = false;
this.innerHTML = '<i class=\'fa fa-play\'></i>';
}
});