Last active
December 17, 2015 22:09
-
-
Save michalskop/5679400 to your computer and use it in GitHub Desktop.
109th US Congress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*based on http://bost.ocks.org/mike/nations/ */ | |
#chart { | |
margin-left: -40px; | |
} | |
text { | |
font: 10px sans-serif; | |
} | |
/*dots*/ | |
.dot { | |
stroke: #000; | |
opacity: .5; | |
stroke-opacity: .75; | |
} | |
.highlighted { | |
stroke: #000; | |
stroke-opacity: 1; | |
stroke-width: 3; | |
opacity: 1; | |
} | |
/*axes*/ | |
.axis path, .axis line { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} | |
.label { | |
fill: #777; | |
} | |
/*year*/ | |
.year.label { | |
font: 500 100px "Helvetica Neue"; | |
fill: #ddd; | |
} | |
.year.label.active { | |
fill: #aaa; | |
} | |
.overlay { | |
fill: none; | |
pointer-events: all; | |
cursor: ew-resize; | |
} | |
/*layout of chart and checkboxes of mps*/ | |
.chart-content { | |
min-height: 460px; | |
} | |
.additional-column { | |
max-height: 460px; | |
/* from http://stackoverflow.com/questions/5715705/always-show-vertical-scrollbar-in-select */ | |
overflow-x: hidden; | |
} | |
#slider-form { | |
width:80%; | |
float:right; | |
} | |
/*computer*/ | |
@media all and (min-width: 770px){ | |
.additional-column { | |
text-align: right; | |
float: right; | |
width: 25%; | |
background: none; | |
} | |
.main-column { | |
width: 70%; | |
float: left; | |
margin-top: 30px; | |
margin-right: 1%; | |
padding-right: 1%; | |
} | |
} | |
/*tooltips*/ | |
/* http://www.d3noob.org/2013/01/adding-tooltips-to-d3js-graph.html */ | |
/* alternative, was not able to use it: bl.ocks.org/ilyabo/1373263 */ | |
div.tooltip { | |
position: absolute; | |
text-align: center; | |
width: 10em; | |
height: 2.5em; | |
padding: 2px; | |
font: .8em sans-serif; | |
background: lightsteelblue; | |
border: 0px; | |
border-radius: 8px; | |
pointer-events: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>US 109th Congress</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script> | |
<script src="http://d3js.org/d3.v2.js?2.8.1"></script> | |
<link href="chart.css" rel="stylesheet" type="text/css" /> | |
<style> | |
/* **for future */ | |
#chart { | |
height: 406px; | |
} | |
</style> | |
<!-- js parameters --> | |
<script> | |
/*from http://stackoverflow.com/questions/2177548/load-json-into-variable */ | |
var parameters = (function () { | |
var parameters = null; | |
$.ajax({ | |
'async': false, | |
'global': false, | |
'url': "parameters.json", | |
'dataType': "json", | |
'success': function (data) { | |
parameters = data; | |
} | |
}); | |
return parameters; | |
})(); | |
</script> | |
</head> | |
<body> | |
<div data-role="page" id="mpage" class="type-home"> | |
<div data-role="content"> | |
<h1>US 109th Congress</h1> | |
<div class="chart-content"> | |
<div class="main-column"> | |
<p id="chart"><svg><defs id="gradients"></defs></svg></p> | |
<div id="slider-play"> | |
<form id="slider-form"> | |
<!--<label for="slider">Slider:</label>--> | |
<input name="slider" id="slider" min="2005.25" max="2006.75" value="2005.25" step=".01" type="range" /> | |
</form> | |
<p id="play-button"> | |
<a href="#" id="play" data-role="button" data-inline="true" data-icon="refresh" data-mini="true"><span id="playText">Play ></span></a> | |
</p> | |
</div> <!-- /slider-play --> | |
</div> | |
<div class="additional-column"> | |
<form> | |
<fieldset data-role="controlgroup" data-mini="true"> | |
<legend>Highlight:</legend> | |
<input class="checkbox-mp" name="checkbox-h-1" id="checkbox-h-1" type="checkbox"> | |
<label for="checkbox-h-1">BUSH</label> | |
<input class="checkbox-mp" name="checkbox-h-2" id="checkbox-h-2" type="checkbox"> | |
<label for="checkbox-h-2">SESSIONS</label> | |
<input class="checkbox-mp" name="checkbox-h-3" id="checkbox-h-3" type="checkbox"> | |
<label for="checkbox-h-3">SHELBY</label> | |
<input class="checkbox-mp" name="checkbox-h-4" id="checkbox-h-4" type="checkbox"> | |
<label for="checkbox-h-4">MURKOWSKI</label> | |
<input class="checkbox-mp" name="checkbox-h-5" id="checkbox-h-5" type="checkbox"> | |
<label for="checkbox-h-5">STEVENS</label> | |
<input class="checkbox-mp" name="checkbox-h-6" id="checkbox-h-6" type="checkbox"> | |
<label for="checkbox-h-6">KYL</label> | |
<input class="checkbox-mp" name="checkbox-h-7" id="checkbox-h-7" type="checkbox"> | |
<label for="checkbox-h-7">MCCAIN</label> | |
<input class="checkbox-mp" name="checkbox-h-8" id="checkbox-h-8" type="checkbox"> | |
<label for="checkbox-h-8">PRYOR</label> | |
<input class="checkbox-mp" name="checkbox-h-9" id="checkbox-h-9" type="checkbox"> | |
<label for="checkbox-h-9">LINCOLN</label> | |
<input class="checkbox-mp" name="checkbox-h-10" id="checkbox-h-10" type="checkbox"> | |
<label for="checkbox-h-10">BOXER</label> | |
<input class="checkbox-mp" name="checkbox-h-11" id="checkbox-h-11" type="checkbox"> | |
<label for="checkbox-h-11">FEINSTEIN</label> | |
<input class="checkbox-mp" name="checkbox-h-12" id="checkbox-h-12" type="checkbox"> | |
<label for="checkbox-h-12">ALLARD</label> | |
<input class="checkbox-mp" name="checkbox-h-13" id="checkbox-h-13" type="checkbox"> | |
<label for="checkbox-h-13">SALAZAR</label> | |
<input class="checkbox-mp" name="checkbox-h-14" id="checkbox-h-14" type="checkbox"> | |
<label for="checkbox-h-14">DODD</label> | |
<input class="checkbox-mp" name="checkbox-h-15" id="checkbox-h-15" type="checkbox"> | |
<label for="checkbox-h-15">LIEBERMAN</label> | |
<input class="checkbox-mp" name="checkbox-h-16" id="checkbox-h-16" type="checkbox"> | |
<label for="checkbox-h-16">BIDEN</label> | |
<input class="checkbox-mp" name="checkbox-h-17" id="checkbox-h-17" type="checkbox"> | |
<label for="checkbox-h-17">CARPER</label> | |
<input class="checkbox-mp" name="checkbox-h-18" id="checkbox-h-18" type="checkbox"> | |
<label for="checkbox-h-18">MARTINEZ</label> | |
<input class="checkbox-mp" name="checkbox-h-19" id="checkbox-h-19" type="checkbox"> | |
<label for="checkbox-h-19">NELSON</label> | |
<input class="checkbox-mp" name="checkbox-h-20" id="checkbox-h-20" type="checkbox"> | |
<label for="checkbox-h-20">CHAMBLISS</label> | |
<input class="checkbox-mp" name="checkbox-h-21" id="checkbox-h-21" type="checkbox"> | |
<label for="checkbox-h-21">ISAKSON</label> | |
<input class="checkbox-mp" name="checkbox-h-22" id="checkbox-h-22" type="checkbox"> | |
<label for="checkbox-h-22">AKAKA</label> | |
<input class="checkbox-mp" name="checkbox-h-23" id="checkbox-h-23" type="checkbox"> | |
<label for="checkbox-h-23">INOUYE</label> | |
<input class="checkbox-mp" name="checkbox-h-24" id="checkbox-h-24" type="checkbox"> | |
<label for="checkbox-h-24">CRAIG</label> | |
<input class="checkbox-mp" name="checkbox-h-25" id="checkbox-h-25" type="checkbox"> | |
<label for="checkbox-h-25">CRAPO</label> | |
<input class="checkbox-mp" name="checkbox-h-26" id="checkbox-h-26" type="checkbox"> | |
<label for="checkbox-h-26">DURBIN</label> | |
<input class="checkbox-mp" name="checkbox-h-27" id="checkbox-h-27" type="checkbox"> | |
<label for="checkbox-h-27">OBAMA</label> | |
<input class="checkbox-mp" name="checkbox-h-28" id="checkbox-h-28" type="checkbox"> | |
<label for="checkbox-h-28">BAYH</label> | |
<input class="checkbox-mp" name="checkbox-h-29" id="checkbox-h-29" type="checkbox"> | |
<label for="checkbox-h-29">LUGAR</label> | |
<input class="checkbox-mp" name="checkbox-h-30" id="checkbox-h-30" type="checkbox"> | |
<label for="checkbox-h-30">GRASSLEY</label> | |
<input class="checkbox-mp" name="checkbox-h-31" id="checkbox-h-31" type="checkbox"> | |
<label for="checkbox-h-31">HARKIN</label> | |
<input class="checkbox-mp" name="checkbox-h-32" id="checkbox-h-32" type="checkbox"> | |
<label for="checkbox-h-32">BROWNBACK</label> | |
<input class="checkbox-mp" name="checkbox-h-33" id="checkbox-h-33" type="checkbox"> | |
<label for="checkbox-h-33">ROBERTS</label> | |
<input class="checkbox-mp" name="checkbox-h-34" id="checkbox-h-34" type="checkbox"> | |
<label for="checkbox-h-34">BUNNING</label> | |
<input class="checkbox-mp" name="checkbox-h-35" id="checkbox-h-35" type="checkbox"> | |
<label for="checkbox-h-35">MCCONNELL</label> | |
<input class="checkbox-mp" name="checkbox-h-36" id="checkbox-h-36" type="checkbox"> | |
<label for="checkbox-h-36">VITTER</label> | |
<input class="checkbox-mp" name="checkbox-h-37" id="checkbox-h-37" type="checkbox"> | |
<label for="checkbox-h-37">LANDRIEU</label> | |
<input class="checkbox-mp" name="checkbox-h-38" id="checkbox-h-38" type="checkbox"> | |
<label for="checkbox-h-38">COLLINS</label> | |
<input class="checkbox-mp" name="checkbox-h-39" id="checkbox-h-39" type="checkbox"> | |
<label for="checkbox-h-39">SNOWE</label> | |
<input class="checkbox-mp" name="checkbox-h-40" id="checkbox-h-40" type="checkbox"> | |
<label for="checkbox-h-40">MIKULSKI</label> | |
<input class="checkbox-mp" name="checkbox-h-41" id="checkbox-h-41" type="checkbox"> | |
<label for="checkbox-h-41">SARBANES</label> | |
<input class="checkbox-mp" name="checkbox-h-42" id="checkbox-h-42" type="checkbox"> | |
<label for="checkbox-h-42">KENNEDYED</label> | |
<input class="checkbox-mp" name="checkbox-h-43" id="checkbox-h-43" type="checkbox"> | |
<label for="checkbox-h-43">KERRYJOHN</label> | |
<input class="checkbox-mp" name="checkbox-h-44" id="checkbox-h-44" type="checkbox"> | |
<label for="checkbox-h-44">STABENOW</label> | |
<input class="checkbox-mp" name="checkbox-h-45" id="checkbox-h-45" type="checkbox"> | |
<label for="checkbox-h-45">LEVINCARL</label> | |
<input class="checkbox-mp" name="checkbox-h-46" id="checkbox-h-46" type="checkbox"> | |
<label for="checkbox-h-46">DAYTON</label> | |
<input class="checkbox-mp" name="checkbox-h-47" id="checkbox-h-47" type="checkbox"> | |
<label for="checkbox-h-47">COLEMAN</label> | |
<input class="checkbox-mp" name="checkbox-h-48" id="checkbox-h-48" type="checkbox"> | |
<label for="checkbox-h-48">COCHRAN</label> | |
<input class="checkbox-mp" name="checkbox-h-49" id="checkbox-h-49" type="checkbox"> | |
<label for="checkbox-h-49">LOTT</label> | |
<input class="checkbox-mp" name="checkbox-h-50" id="checkbox-h-50" type="checkbox"> | |
<label for="checkbox-h-50">TALENT</label> | |
<input class="checkbox-mp" name="checkbox-h-51" id="checkbox-h-51" type="checkbox"> | |
<label for="checkbox-h-51">BOND</label> | |
<input class="checkbox-mp" name="checkbox-h-52" id="checkbox-h-52" type="checkbox"> | |
<label for="checkbox-h-52">BAUCUS</label> | |
<input class="checkbox-mp" name="checkbox-h-53" id="checkbox-h-53" type="checkbox"> | |
<label for="checkbox-h-53">BURNS</label> | |
<input class="checkbox-mp" name="checkbox-h-54" id="checkbox-h-54" type="checkbox"> | |
<label for="checkbox-h-54">HAGEL</label> | |
<input class="checkbox-mp" name="checkbox-h-55" id="checkbox-h-55" type="checkbox"> | |
<label for="checkbox-h-55">NELSONBEN</label> | |
<input class="checkbox-mp" name="checkbox-h-56" id="checkbox-h-56" type="checkbox"> | |
<label for="checkbox-h-56">ENSIGN</label> | |
<input class="checkbox-mp" name="checkbox-h-57" id="checkbox-h-57" type="checkbox"> | |
<label for="checkbox-h-57">REID</label> | |
<input class="checkbox-mp" name="checkbox-h-58" id="checkbox-h-58" type="checkbox"> | |
<label for="checkbox-h-58">GREGG</label> | |
<input class="checkbox-mp" name="checkbox-h-59" id="checkbox-h-59" type="checkbox"> | |
<label for="checkbox-h-59">SUNUNU</label> | |
<input class="checkbox-mp" name="checkbox-h-60" id="checkbox-h-60" type="checkbox"> | |
<label for="checkbox-h-60">CORZINE</label> | |
<input class="checkbox-mp" name="checkbox-h-61" id="checkbox-h-61" type="checkbox"> | |
<label for="checkbox-h-61">MENENDEZ</label> | |
<input class="checkbox-mp" name="checkbox-h-62" id="checkbox-h-62" type="checkbox"> | |
<label for="checkbox-h-62">LAUTENBERG</label> | |
<input class="checkbox-mp" name="checkbox-h-63" id="checkbox-h-63" type="checkbox"> | |
<label for="checkbox-h-63">BINGAMAN</label> | |
<input class="checkbox-mp" name="checkbox-h-64" id="checkbox-h-64" type="checkbox"> | |
<label for="checkbox-h-64">DOMENICI</label> | |
<input class="checkbox-mp" name="checkbox-h-65" id="checkbox-h-65" type="checkbox"> | |
<label for="checkbox-h-65">CLINTON</label> | |
<input class="checkbox-mp" name="checkbox-h-66" id="checkbox-h-66" type="checkbox"> | |
<label for="checkbox-h-66">SCHUMER</label> | |
<input class="checkbox-mp" name="checkbox-h-67" id="checkbox-h-67" type="checkbox"> | |
<label for="checkbox-h-67">BURR</label> | |
<input class="checkbox-mp" name="checkbox-h-68" id="checkbox-h-68" type="checkbox"> | |
<label for="checkbox-h-68">DOLE</label> | |
<input class="checkbox-mp" name="checkbox-h-69" id="checkbox-h-69" type="checkbox"> | |
<label for="checkbox-h-69">CONRAD</label> | |
<input class="checkbox-mp" name="checkbox-h-70" id="checkbox-h-70" type="checkbox"> | |
<label for="checkbox-h-70">DORGAN</label> | |
<input class="checkbox-mp" name="checkbox-h-71" id="checkbox-h-71" type="checkbox"> | |
<label for="checkbox-h-71">DEWINE</label> | |
<input class="checkbox-mp" name="checkbox-h-72" id="checkbox-h-72" type="checkbox"> | |
<label for="checkbox-h-72">VOINOVICH</label> | |
<input class="checkbox-mp" name="checkbox-h-73" id="checkbox-h-73" type="checkbox"> | |
<label for="checkbox-h-73">INHOFE</label> | |
<input class="checkbox-mp" name="checkbox-h-74" id="checkbox-h-74" type="checkbox"> | |
<label for="checkbox-h-74">COBURN</label> | |
<input class="checkbox-mp" name="checkbox-h-75" id="checkbox-h-75" type="checkbox"> | |
<label for="checkbox-h-75">SMITHGORD</label> | |
<input class="checkbox-mp" name="checkbox-h-76" id="checkbox-h-76" type="checkbox"> | |
<label for="checkbox-h-76">WYDEN</label> | |
<input class="checkbox-mp" name="checkbox-h-77" id="checkbox-h-77" type="checkbox"> | |
<label for="checkbox-h-77">SANTORUM</label> | |
<input class="checkbox-mp" name="checkbox-h-78" id="checkbox-h-78" type="checkbox"> | |
<label for="checkbox-h-78">SPECTER</label> | |
<input class="checkbox-mp" name="checkbox-h-79" id="checkbox-h-79" type="checkbox"> | |
<label for="checkbox-h-79">CHAFEE</label> | |
<input class="checkbox-mp" name="checkbox-h-80" id="checkbox-h-80" type="checkbox"> | |
<label for="checkbox-h-80">REED</label> | |
<input class="checkbox-mp" name="checkbox-h-81" id="checkbox-h-81" type="checkbox"> | |
<label for="checkbox-h-81">DEMINT</label> | |
<input class="checkbox-mp" name="checkbox-h-82" id="checkbox-h-82" type="checkbox"> | |
<label for="checkbox-h-82">GRAHAM</label> | |
<input class="checkbox-mp" name="checkbox-h-83" id="checkbox-h-83" type="checkbox"> | |
<label for="checkbox-h-83">THUNE</label> | |
<input class="checkbox-mp" name="checkbox-h-84" id="checkbox-h-84" type="checkbox"> | |
<label for="checkbox-h-84">JOHNSON</label> | |
<input class="checkbox-mp" name="checkbox-h-85" id="checkbox-h-85" type="checkbox"> | |
<label for="checkbox-h-85">FRIST</label> | |
<input class="checkbox-mp" name="checkbox-h-86" id="checkbox-h-86" type="checkbox"> | |
<label for="checkbox-h-86">ALEXANDER</label> | |
<input class="checkbox-mp" name="checkbox-h-87" id="checkbox-h-87" type="checkbox"> | |
<label for="checkbox-h-87">CORNYN</label> | |
<input class="checkbox-mp" name="checkbox-h-88" id="checkbox-h-88" type="checkbox"> | |
<label for="checkbox-h-88">HUTCHISON</label> | |
<input class="checkbox-mp" name="checkbox-h-89" id="checkbox-h-89" type="checkbox"> | |
<label for="checkbox-h-89">BENNETT</label> | |
<input class="checkbox-mp" name="checkbox-h-90" id="checkbox-h-90" type="checkbox"> | |
<label for="checkbox-h-90">HATCH</label> | |
<input class="checkbox-mp" name="checkbox-h-91" id="checkbox-h-91" type="checkbox"> | |
<label for="checkbox-h-91">JEFFORDS</label> | |
<input class="checkbox-mp" name="checkbox-h-92" id="checkbox-h-92" type="checkbox"> | |
<label for="checkbox-h-92">LEAHY</label> | |
<input class="checkbox-mp" name="checkbox-h-93" id="checkbox-h-93" type="checkbox"> | |
<label for="checkbox-h-93">ALLEN</label> | |
<input class="checkbox-mp" name="checkbox-h-94" id="checkbox-h-94" type="checkbox"> | |
<label for="checkbox-h-94">WARNER</label> | |
<input class="checkbox-mp" name="checkbox-h-95" id="checkbox-h-95" type="checkbox"> | |
<label for="checkbox-h-95">CANTWELL</label> | |
<input class="checkbox-mp" name="checkbox-h-96" id="checkbox-h-96" type="checkbox"> | |
<label for="checkbox-h-96">MURRAY</label> | |
<input class="checkbox-mp" name="checkbox-h-97" id="checkbox-h-97" type="checkbox"> | |
<label for="checkbox-h-97">BYRDROBER</label> | |
<input class="checkbox-mp" name="checkbox-h-98" id="checkbox-h-98" type="checkbox"> | |
<label for="checkbox-h-98">ROCKEFELLER</label> | |
<input class="checkbox-mp" name="checkbox-h-99" id="checkbox-h-99" type="checkbox"> | |
<label for="checkbox-h-99">FEINGOLD</label> | |
<input class="checkbox-mp" name="checkbox-h-100" id="checkbox-h-100" type="checkbox"> | |
<label for="checkbox-h-100">KOHL</label> | |
<input class="checkbox-mp" name="checkbox-h-101" id="checkbox-h-101" type="checkbox"> | |
<label for="checkbox-h-101">ENZI</label> | |
<input class="checkbox-mp" name="checkbox-h-102" id="checkbox-h-102" type="checkbox"> | |
<label for="checkbox-h-102">THOMAS</label> | |
</fieldset> | |
</form> | |
</div> <!-- /additional-column --> | |
</div> <!-- /chart-content --> | |
<div class="description"> | |
</div> | |
<script src="motion.js"></script> | |
<p>Method: weighted PCA; Time intervals: approx. 6 months (projection of approx. 6-month blocks into all data, time is only approximated in this example)</p> | |
<p>Using <a href="https://github.com/michalskop/mpv_motion">Models of parliamentary voting in motion</a></p> | |
</div> <!-- /content --> | |
</div><!-- /page --> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Various accessors that specify the four dimensions of data to visualize. | |
function x(d) { return d.d1; } | |
function y(d) { return d.d2; } | |
function z(d) { return d.d3; } | |
function radius(d) { | |
/*if (("#"+d.id).length > 0) { | |
return 2; | |
} else */ | |
return 1; | |
} | |
function color(d) { return d.color; } | |
function mid(d) { return d.id; } | |
function key(d) { return d.id; } | |
function display(d) { return d.display;} | |
function mname(d) {return d.name;} | |
// Chart dimensions. | |
var margin = {top: 19.5, right: 19.5, bottom: 19.5, left: 39.5}, | |
width = parameters.width - margin.right, | |
height = parameters.height - margin.top - margin.bottom; | |
// Various scales. These domains make assumptions of data, naturally. | |
var xScale = d3.scale.linear().domain([parameters.xscale[0], parameters.xscale[1]]).range([0, width]), | |
yScale = d3.scale.linear().domain([parameters.yscale[0], parameters.yscale[1]]).range([height, 0]), | |
radiusScale = d3.scale.sqrt().domain([0, 1]).range([0, 10]); | |
//colorScale = d3.scale.category10(); | |
var colorScale = d3.scale.category20c(); | |
// The x & y axes. | |
var xAxis = d3.svg.axis().orient("bottom").scale(xScale).ticks(12, d3.format(",d")), | |
yAxis = d3.svg.axis().scale(yScale).orient("left"); | |
// Create the SVG container and set the origin. | |
var svg = d3.select("#chart svg") //d3.select("#chart").append("svg") | |
.attr("width", width + margin.left + margin.right) | |
.attr("height", height + margin.top + margin.bottom) | |
.append("g") | |
.attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
// Add the x-axis. | |
svg.append("g") | |
.attr("class", "x axis") | |
.attr("transform", "translate(0," + height + ")") | |
.call(xAxis); | |
// Add the y-axis. | |
svg.append("g") | |
.attr("class", "y axis") | |
.call(yAxis); | |
// Add an x-axis label. | |
svg.append("text") | |
.attr("class", "x label") | |
.attr("text-anchor", "end") | |
.attr("x", width) | |
.attr("y", height - 6) | |
.text("Dimension 1"); | |
// Add a y-axis label. | |
svg.append("text") | |
.attr("class", "y label") | |
.attr("text-anchor", "end") | |
.attr("y", 6) | |
.attr("dy", ".75em") | |
.attr("transform", "rotate(-90)") | |
.text("Dimension 2"); | |
// Add the year label; the value is set on transition. | |
tmp_month = Math.ceil((parameters.start - Math.floor(parameters.start))*12); | |
tmp_year = Math.floor(parameters.start) + '/' + tmp_month; | |
var label = svg.append("text") | |
.attr("class", "year label") | |
.attr("text-anchor", "end") | |
.attr("y", height - 24) | |
.attr("x", width) | |
.text(tmp_year); | |
var formatTime = d3.time.format("%e %B"); | |
var div = d3.select("body").append("div") | |
.attr("class", "tooltip") | |
.style("opacity", 0); | |
// Load the data. | |
d3.json(parameters.data, function(nations) { | |
// A bisector since many nation's data is sparsely-defined. | |
var bisect = d3.bisector(function(d) { return d[0]; }); | |
// Add a dot per nation. Initialize the data at 1800, and set the colors. | |
var dot = svg.append("g") | |
.attr("class", "dots") | |
.selectAll(".dot") | |
.data(interpolateData(parameters.start)) //here we set up the dots at the beggining | |
.enter().append("circle") | |
.attr("class", "dot") | |
//.attr("id",function(d) {return "dot-"+key(d)}) //wrong!, shall be in position() and interpolateData | |
.call(position) | |
.call(checkCheckboxes) | |
.sort(order) | |
.on("mouseover", showTooltip) | |
.on("mouseout", hideTooltip) | |
.on("mousedown", switchHighlight); | |
/*FF keeps the checkboxes on reload, so we need to check them at the beginning*/ | |
function checkCheckboxes() { | |
$(".checkbox-mp").each(function(i) { | |
a = $(this).attr('id').split('-'); | |
id = a[a.length-1]; | |
if ($('#checkbox-h-'+id).prop('checked')) | |
highlight($('#dot-'+id)); | |
}); | |
} | |
//switch highligth | |
function switchHighlight(d) { | |
a = d.id.split('-'); | |
id = a[a.length-1]; | |
if ($('#'+d.id).attr("class") == 'dot') { | |
highlight($('#'+d.id)); | |
$("input#checkbox-h-"+id).attr("checked",true).checkboxradio("refresh"); | |
} else { | |
dehighlight($('#'+d.id)); | |
$("input#checkbox-h-"+id).attr("checked",false).checkboxradio("refresh"); | |
} | |
} | |
// show/hide tooltip | |
function showTooltip(d) { | |
div.transition() | |
.duration(200) | |
.style("opacity", .9); | |
div .html(d.name + "<br/>" + d.group) | |
.style("left", (d3.event.pageX) + "px") | |
.style("top", (d3.event.pageY - 28) + "px"); | |
} | |
function hideTooltip(d) { | |
div.transition() | |
.duration(500) | |
.style("opacity", 0) | |
} | |
var i=0; | |
var playing = false; | |
$("#play").click(function() { | |
if(playing === false) { | |
startPlaying(); | |
} else { | |
stopPlaying(); | |
} | |
}); | |
function startPlaying() { | |
playing = true; | |
$("#playText").html("Stop ||"); | |
$('#slider').slider('disable'); | |
// Start a transition that interpolates the data based on year. | |
svg.transition() | |
.duration(30000*(parameters.untilchart-parseFloat($('#slider').val()))/(parameters.untilchart-parameters.sincechart+0.0001)) | |
.ease("linear") | |
.tween("year", function() {return tweenYear($('#slider').val()) }) | |
.each("end", stopPlaying); | |
} | |
function stopPlaying() { | |
playing = false; | |
$("#playText").html("Play >"); | |
svg.transition().duration(0); | |
$('#slider').slider('enable'); | |
} | |
// Positions the dots based on data. | |
function position(dot) { | |
dot .attr("cx", function(d) { return xScale(x(d)); }) | |
.attr("cy", function(d) { return yScale(y(d)); }) | |
.attr("r", function(d) { return radiusScale(radius(d)) }) | |
.attr("id", function(d) {return mid(d);}) | |
.style("fill", function (d) { return gradient(color(d)) }) | |
.attr("display", function (d) { return display(d);}) | |
.attr("title", function (d) {return mname(d);}); | |
} | |
// Defines a sort order so that the smallest dots are drawn on top. | |
function order(a, b) { | |
return radius(b) - radius(a); | |
} | |
// Tweens the entire chart by first tweening the year, and then the data. | |
// For the interpolated data, the dots and label are redrawn. | |
function tweenYear(start) { | |
//if ((parseFloat(start)+0.01) >= parameters.untilchart) start=parameters.sincechart; | |
var year = d3.interpolateNumber(parseFloat(start),parameters.untilchart); | |
return function(t) { displayYear(year(t)); }; | |
} | |
// Updates the display to show the specified year. | |
function displayYear(year) { | |
dot.data(interpolateData(year), key).call(position).sort(order); | |
month = Math.ceil((year - Math.floor(year))*12); | |
label.text(Math.floor(year) + '/' + month); | |
i++; | |
if ((i%25) == 0) { //to prevent jumping and for speed of animation -> "25" | |
$("#slider").val(year); | |
$('#slider').slider('refresh'); | |
} | |
} | |
// Interpolates the dataset for the given (fractional) year. | |
function interpolateData(year) { | |
return nations.map(function(d) { | |
return { | |
name: d.name, | |
id: "dot-"+d.id, | |
d1: interpolateValues(d.d1, year), | |
d2: interpolateValues(d.d2, year), | |
color: findColor(d.color, year, true), | |
display: isDisplayed(d.d1, year), | |
title: d.name, | |
group: findColor(d.color, year, false) | |
}; | |
}); | |
} | |
// Finds (and possibly interpolates) the value for the specified year. | |
function interpolateValues(values, year) { | |
var i = bisect.left(values, year, 0, values.length - 1), | |
a = values[i]; | |
if (i > 0) { | |
var b = values[i - 1], | |
t = (year - a[0]) / (b[0] - a[0]); | |
return a[1] * (1 - t) + b[1] * t; | |
} | |
return a[1]; | |
} | |
function findColor(values, year, color) { | |
var i = bisect.left(values, year, 0, values.length - 1); | |
if (color) | |
return values[i][2]; | |
else | |
return values[i][1]; | |
} | |
function isDisplayed(values, year) { | |
if ( (year < values[0][0]) || (year > values[values.length - 1][0])) | |
return 'none'; | |
else | |
return 'inherit'; | |
} | |
function highlight(d) { | |
d.attr("class","dot highlighted"); | |
//d.addClass("highlight"); we cannot use this, because http://bugs.jquery.com/ticket/10329 | |
} | |
function dehighlight(d) { | |
d.attr('class','dot'); | |
//d.removeClass("highlight"); we cannot use this, because http://bugs.jquery.com/ticket/10329 | |
} | |
//checkboxes | |
$('.checkbox-mp').click (function () { | |
var thisCheck = $(this); | |
a = $(this).attr('id').split('-'); | |
id = a[a.length-1]; | |
if (thisCheck.is (':checked')) { | |
highlight($("#dot-"+id)); | |
} else { | |
dehighlight($("#dot-"+id)); | |
} | |
}); | |
//slider | |
//see http://michalskop.tumblr.com/post/37352195911/strange-behaviour-of-jquery-change | |
$('#slider').ready(function() { | |
$('#slider').change(function(){ | |
displayYear($(this).val()); | |
}); | |
}); | |
//color gradients | |
//http://dexvis.wordpress.com/2012/12/25/motion-charts-revisited/ | |
function shadeColor(color, percent) { | |
var R = parseInt(color.substring(1,3),16) | |
var G = parseInt(color.substring(3,5),16) | |
var B = parseInt(color.substring(5,7),16); | |
R = parseInt(R * (100 + percent) / 100); | |
G = parseInt(G * (100 + percent) / 100); | |
B = parseInt(B * (100 + percent) / 100); | |
R = (R<255)?R:255; | |
G = (G<255)?G:255; | |
B = (B<255)?B:255; | |
var RR = ((R.toString(16).length==1)?"0"+R.toString(16):R.toString(16)); | |
var GG = ((G.toString(16).length==1)?"0"+G.toString(16):G.toString(16)); | |
var BB = ((B.toString(16).length==1)?"0"+B.toString(16):B.toString(16)); | |
return "#"+RR+GG+BB; | |
} | |
function gradient(baseColor) | |
{ | |
var gradientId = "gradient" + baseColor.substring(1) | |
console.log("COLOR: " + gradientId); | |
//var lightColor = shadeColor(baseColor, -10) | |
var darkColor = shadeColor(baseColor, -20) | |
var grad = d3.select("#gradients").selectAll("#" + gradientId) | |
.data([ gradientId ]) | |
.enter() | |
.append("radialGradient") | |
.attr("id", gradientId) | |
.attr("gradientUnits", "objectBoundingBox") | |
.attr("fx", "30%") | |
.attr("fy", "30%") | |
grad.append("stop") | |
.attr("offset", "0%") | |
.attr("style", "stop-color:#FFFFFF") | |
// Middle | |
grad.append("stop") | |
.attr("offset", "40%") | |
.attr("style", "stop-color:" + baseColor) | |
// Outer Edges | |
grad.append("stop") | |
.attr("offset", "100%") | |
.attr("style", "stop-color:" + darkColor) | |
console.log("url(#" + gradientId + ")") | |
return "url(#" + gradientId + ")"; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"width":600, | |
"height":400, | |
"xscale":[-20,20], | |
"yscale":[-10,10], | |
"data":"us_congress_109_1h.json", | |
"start":2005.25, | |
"sincechart":2005.25, | |
"untilchart":2006.75 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"name":"BUSH","id":1,"d1":[[2005.25,11.552],[2005.75,11.15098],[2006.75,7.532]],"d2":[[2005.25,-2.594],[2005.75,-0.63281],[2006.75,-1.439]],"color":[[2005.25,"President","#800000"],[2005.75,"President","#800000"],[2006.75,"President","#800000"]]},{"name":"SESSIONS","id":2,"d1":[[2005.25,12.507],[2005.75,11.65002],[2006.25,13.9571],[2006.75,13.609]],"d2":[[2005.25,-2.182],[2005.75,0.84351],[2006.25,2.9539],[2006.75,9.609]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SHELBY","id":3,"d1":[[2005.25,11.639],[2005.75,10.197],[2006.25,13.5001],[2006.75,10.608]],"d2":[[2005.25,-2.097],[2005.75,-0.41138],[2006.25,1.5833],[2006.75,6.014]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"MURKOWSKI","id":4,"d1":[[2005.25,11.555],[2005.75,10.94251],[2006.25,12.6066],[2006.75,7.928]],"d2":[[2005.25,-3.781],[2005.75,-3.63989],[2006.25,-1.3971],[2006.75,-2.558]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"STEVENS","id":5,"d1":[[2005.25,12.514],[2005.75,10.95352],[2006.25,12.7129],[2006.75,6.976]],"d2":[[2005.25,-3.945],[2005.75,-3.2535],[2006.25,-1.0335],[2006.75,-3.637]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"KYL","id":6,"d1":[[2005.25,13.018],[2005.75,11.37388],[2006.25,13.9347],[2006.75,11.916]],"d2":[[2005.25,-2.876],[2005.75,1.1457],[2006.25,2.9595],[2006.75,7.27]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"MCCAIN","id":7,"d1":[[2005.25,9.861],[2005.75,7.52492],[2006.25,10.355],[2006.75,5.551]],"d2":[[2005.25,-6.201],[2005.75,-5.74539],[2006.25,0.1185],[2006.75,-4.77]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"PRYOR","id":8,"d1":[[2005.25,-12.199],[2005.75,-8.07969],[2006.25,-13.6653],[2006.75,-9.262]],"d2":[[2005.25,3.544],[2005.75,3.59404],[2006.25,-0.6457],[2006.75,-3.874]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"LINCOLN","id":9,"d1":[[2005.25,-13.135],[2005.75,-9.40558],[2006.25,-13.738],[2006.75,-10.379]],"d2":[[2005.25,2.85],[2005.75,4.09185],[2006.25,-0.7928],[2006.75,-4.335]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BOXER","id":10,"d1":[[2005.25,-15.787],[2005.75,-14.66035],[2006.25,-15.401],[2006.75,-14.08]],"d2":[[2005.25,5.155],[2005.75,3.7956],[2006.25,1.0484],[2006.75,-3.154]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"FEINSTEIN","id":11,"d1":[[2005.25,-14.416],[2005.75,-12.52186],[2006.25,-14.5832],[2006.75,-13.17]],"d2":[[2005.25,4.586],[2005.75,2.39761],[2006.25,0.1001],[2006.75,-4.031]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"ALLARD","id":12,"d1":[[2005.25,12.337],[2005.75,11.77957],[2006.25,13.8232],[2006.75,12.655]],"d2":[[2005.25,-1.311],[2005.75,-0.43728],[2006.25,2.4735],[2006.75,7.914]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SALAZAR","id":13,"d1":[[2005.25,-14.477],[2005.75,-9.08858],[2006.25,-13.9798],[2006.75,-12.994]],"d2":[[2005.25,4.26],[2005.75,3.3353],[2006.25,-0.1362],[2006.75,-5.845]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DODD","id":14,"d1":[[2005.25,-14.232],[2005.75,-14.09623],[2006.25,-15.3245],[2006.75,-13.693]],"d2":[[2005.25,3.729],[2005.75,2.58354],[2006.25,1.0256],[2006.75,-3.585]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"LIEBERMAN","id":15,"d1":[[2005.25,-13.584],[2005.75,-12.4489],[2006.25,-14.0518],[2006.75,-12.23]],"d2":[[2005.25,3.899],[2005.75,-0.25367],[2006.25,-0.7843],[2006.75,-6.492]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BIDEN","id":16,"d1":[[2005.25,-11.644],[2005.75,-14.36678],[2006.25,-14.8853],[2006.75,-13.541]],"d2":[[2005.25,1.424],[2005.75,1.26337],[2006.25,0.1113],[2006.75,-4.743]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"CARPER","id":17,"d1":[[2005.25,-8.674],[2005.75,-11.49687],[2006.25,-11.7387],[2006.75,-9.719]],"d2":[[2005.25,-1.451],[2005.75,0.94899],[2006.25,-0.2446],[2006.75,-4.555]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"MARTINEZ","id":18,"d1":[[2005.25,12.152],[2005.75,9.90763],[2006.25,13.367],[2006.75,8.321]],"d2":[[2005.25,-3.888],[2005.75,-2.76996],[2006.25,1.5755],[2006.75,-3.61]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"NELSON","id":19,"d1":[[2005.25,-12.133],[2005.75,-10.34518],[2006.25,-13.7627],[2006.75,-8.202]],"d2":[[2005.25,3.735],[2005.75,-0.00869],[2006.25,0.2823],[2006.75,-2.921]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"CHAMBLISS","id":20,"d1":[[2005.25,12.038],[2005.75,11.54532],[2006.25,13.341],[2006.75,12.827]],"d2":[[2005.25,-1.538],[2005.75,0.79782],[2006.25,1.8651],[2006.75,8.819]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"ISAKSON","id":21,"d1":[[2005.25,12.406],[2005.75,11.4119],[2006.25,13.5277],[2006.75,13.313]],"d2":[[2005.25,-2.113],[2005.75,0.49431],[2006.25,2.218],[2006.75,8.767]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"AKAKA","id":22,"d1":[[2005.25,-15.3],[2005.75,-14.15473],[2006.25,-13.6867],[2006.75,-13.884]],"d2":[[2005.25,5.203],[2005.75,1.14956],[2006.25,0.9124],[2006.75,-6.706]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"INOUYE","id":23,"d1":[[2005.25,-13.978],[2005.75,-12.67189],[2006.25,-12.8624],[2006.75,-13.081]],"d2":[[2005.25,3.222],[2005.75,1.47357],[2006.25,1.1056],[2006.75,-6.591]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"CRAIG","id":24,"d1":[[2005.25,11.966],[2005.75,10.12936],[2006.25,13.7734],[2006.75,10.932]],"d2":[[2005.25,-1.966],[2005.75,0.21907],[2006.25,2.5339],[2006.75,2.4]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CRAPO","id":25,"d1":[[2005.25,12.438],[2005.75,10.93459],[2006.25,13.548],[2006.75,12.146]],"d2":[[2005.25,-2.442],[2005.75,0.827],[2006.25,2.7007],[2006.75,7.599]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"DURBIN","id":26,"d1":[[2005.25,-15.538],[2005.75,-14.84059],[2006.25,-15.3721],[2006.75,-14.327]],"d2":[[2005.25,4.89],[2005.75,2.23556],[2006.25,0.4135],[2006.75,-4.896]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"OBAMA","id":27,"d1":[[2005.25,-14.943],[2005.75,-14.45838],[2006.25,-15.3047],[2006.75,-13.978]],"d2":[[2005.25,4.521],[2005.75,3.02489],[2006.25,0.1246],[2006.75,-4.385]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BAYH","id":28,"d1":[[2005.25,-13.192],[2005.75,-12.70901],[2006.25,-14.7914],[2006.75,-12.295]],"d2":[[2005.25,5.245],[2005.75,3.56143],[2006.25,-0.5929],[2006.75,-2.827]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"LUGAR","id":29,"d1":[[2005.25,11.82],[2005.75,8.792],[2006.25,10.2345],[2006.75,6.305]],"d2":[[2005.25,-4.858],[2005.75,-6.49317],[2006.25,-3.5038],[2006.75,-4.284]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"GRASSLEY","id":30,"d1":[[2005.25,12.827],[2005.75,11.10701],[2006.25,13.1177],[2006.75,12.39]],"d2":[[2005.25,-3.117],[2005.75,0.17058],[2006.25,0.5709],[2006.75,7.986]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"HARKIN","id":31,"d1":[[2005.25,-15.252],[2005.75,-14.17435],[2006.25,-15.3815],[2006.75,-13.408]],"d2":[[2005.25,5.297],[2005.75,3.25629],[2006.25,0.0443],[2006.75,-5.145]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BROWNBACK","id":32,"d1":[[2005.25,11.989],[2005.75,11.54684],[2006.25,13.8561],[2006.75,7.546]],"d2":[[2005.25,-3.989],[2005.75,-1.01019],[2006.25,2.3144],[2006.75,-2.788]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"ROBERTS","id":33,"d1":[[2005.25,12.107],[2005.75,11.50939],[2006.25,13.1925],[2006.75,12.021]],"d2":[[2005.25,-3.282],[2005.75,-1.45566],[2006.25,1.1876],[2006.75,7.448]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"BUNNING","id":34,"d1":[[2005.25,12.707],[2005.75,12.1285],[2006.25,13.8656],[2006.75,13.63]],"d2":[[2005.25,-2.793],[2005.75,0.44872],[2006.25,3.1662],[2006.75,8.522]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"MCCONNELL","id":35,"d1":[[2005.25,12.987],[2005.75,12.32332],[2006.25,13.9074],[2006.75,12.513]],"d2":[[2005.25,-3.477],[2005.75,-1.93509],[2006.25,2.2826],[2006.75,5.411]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"VITTER","id":36,"d1":[[2005.25,11.455],[2005.75,10.40986],[2006.25,13.2178],[2006.75,12.808]],"d2":[[2005.25,-0.902],[2005.75,1.54166],[2006.25,2.8132],[2006.75,8.183]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"LANDRIEU","id":37,"d1":[[2005.25,-11.145],[2005.75,-8.01654],[2006.25,-10.3871],[2006.75,-9.279]],"d2":[[2005.25,4.447],[2005.75,3.43815],[2006.25,0.3989],[2006.75,-5.23]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"COLLINS","id":38,"d1":[[2005.25,4.077],[2005.75,2.3192],[2006.25,1.3335],[2006.75,1.861]],"d2":[[2005.25,-9.296],[2005.75,-7.22088],[2006.25,-10.1476],[2006.75,-6.508]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SNOWE","id":39,"d1":[[2005.25,2.001],[2005.75,0.92076],[2006.25,-0.4432],[2006.75,-0.798]],"d2":[[2005.25,-9.308],[2005.75,-8.6048],[2006.25,-9.8988],[2006.75,-6.962]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"MIKULSKI","id":40,"d1":[[2005.25,-15.345],[2005.75,-14.59045],[2006.25,-15.296],[2006.75,-14.119]],"d2":[[2005.25,5.294],[2005.75,1.328],[2006.25,-0.5862],[2006.75,-5.797]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"SARBANES","id":41,"d1":[[2005.25,-15.251],[2005.75,-14.59411],[2006.25,-15.2536],[2006.75,-14.505]],"d2":[[2005.25,4.777],[2005.75,2.22525],[2006.25,-0.2251],[2006.75,-5.967]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"KENNEDYED","id":42,"d1":[[2005.25,-15.836],[2005.75,-15.03417],[2006.25,-15.3144],[2006.75,-14.591]],"d2":[[2005.25,5.405],[2005.75,2.80222],[2006.25,0.1568],[2006.75,-7.259]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"KERRYJOHN","id":43,"d1":[[2005.25,-15.319],[2005.75,-14.20664],[2006.25,-15.2688],[2006.75,-14.026]],"d2":[[2005.25,5.001],[2005.75,1.86096],[2006.25,0.4116],[2006.75,-6.885]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"STABENOW","id":44,"d1":[[2005.25,-14.63],[2005.75,-13.43442],[2006.25,-15.1509],[2006.75,-11.9]],"d2":[[2005.25,4.993],[2005.75,2.97346],[2006.25,0.0967],[2006.75,-1.602]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"LEVINCARL","id":45,"d1":[[2005.25,-15.29],[2005.75,-14.25692],[2006.25,-14.78],[2006.75,-14.127]],"d2":[[2005.25,5.007],[2005.75,2.49824],[2006.25,0.5213],[2006.75,-5.207]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DAYTON","id":46,"d1":[[2005.25,-15.119],[2005.75,-14.10774],[2006.25,-14.8882],[2006.75,-12.925]],"d2":[[2005.25,4.804],[2005.75,2.77408],[2006.25,-0.1827],[2006.75,-6.127]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"COLEMAN","id":47,"d1":[[2005.25,7.973],[2005.75,7.64804],[2006.25,5.7444],[2006.75,6.697]],"d2":[[2005.25,-6.956],[2005.75,-5.51107],[2006.25,-7.2128],[2006.75,-3.126]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"COCHRAN","id":48,"d1":[[2005.25,12.521],[2005.75,12.06828],[2006.25,13.1759],[2006.75,9.686]],"d2":[[2005.25,-3.333],[2005.75,-1.77649],[2006.25,0.2599],[2006.75,3.927]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"LOTT","id":49,"d1":[[2005.25,12.515],[2005.75,11.15046],[2006.25,12.9121],[2006.75,12.341]],"d2":[[2005.25,-2.017],[2005.75,-0.43005],[2006.25,2.1097],[2006.75,6.891]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"TALENT","id":50,"d1":[[2005.25,11.092],[2005.75,8.91819],[2006.25,8.8547],[2006.75,8.277]],"d2":[[2005.25,-3.132],[2005.75,-2.07556],[2006.25,-3.5566],[2006.75,7.874]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"BOND","id":51,"d1":[[2005.25,12.155],[2005.75,11.68861],[2006.25,12.5708],[2006.75,11.602]],"d2":[[2005.25,-2.681],[2005.75,-1.90419],[2006.25,0.6893],[2006.75,5.268]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"BAUCUS","id":52,"d1":[[2005.25,-9.751],[2005.75,-8.40888],[2006.25,-11.6725],[2006.75,-10.378]],"d2":[[2005.25,4.246],[2005.75,3.94943],[2006.25,-1.2095],[2006.75,-5.474]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BURNS","id":53,"d1":[[2005.25,12.154],[2005.75,11.32362],[2006.25,11.7737],[2006.75,10.852]],"d2":[[2005.25,-2.838],[2005.75,-1.89967],[2006.25,0.8532],[2006.75,6.923]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"HAGEL","id":54,"d1":[[2005.25,12.021],[2005.75,10.90283],[2006.25,13.4802],[2006.75,8.082]],"d2":[[2005.25,-3.735],[2005.75,-2.83994],[2006.25,0.7479],[2006.75,-2.611]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"NELSONBEN","id":55,"d1":[[2005.25,-0.129],[2005.75,-1.04743],[2006.25,-2.8383],[2006.75,4.867]],"d2":[[2005.25,-1.001],[2005.75,1.49447],[2006.25,-0.2202],[2006.75,7.981]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"ENSIGN","id":56,"d1":[[2005.25,12.25],[2005.75,10.06554],[2006.25,12.7945],[2006.75,11.294]],"d2":[[2005.25,-2.399],[2005.75,-0.68629],[2006.25,3.0123],[2006.75,8.225]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"REID","id":57,"d1":[[2005.25,-15.067],[2005.75,-12.28718],[2006.25,-15.0164],[2006.75,-13.615]],"d2":[[2005.25,4.799],[2005.75,1.83238],[2006.25,0.4035],[2006.75,-6.085]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"GREGG","id":58,"d1":[[2005.25,12.508],[2005.75,9.3572],[2006.25,12.7159],[2006.75,10.279]],"d2":[[2005.25,-2.127],[2005.75,-3.52284],[2006.25,1.4026],[2006.75,3.031]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SUNUNU","id":59,"d1":[[2005.25,11.516],[2005.75,9.32567],[2006.25,11.7453],[2006.75,10.974]],"d2":[[2005.25,-1.521],[2005.75,-1.88748],[2006.25,0.2037],[2006.75,6.865]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CORZINE","id":60,"d1":[[2005.25,-15.853],[2005.75,-14.46341]],"d2":[[2005.25,6.284],[2005.75,1.17672]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"]]},{"name":"MENENDEZ","id":61,"d1":[[2005.25,-14.657],[2006.25,-15.0716],[2006.75,-13.698]],"d2":[[2005.25,5.756],[2006.25,2.3952],[2006.75,-6.735]],"color":[[2005.25,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"LAUTENBERG","id":62,"d1":[[2005.25,-15.615],[2005.75,-14.42111],[2006.25,-15.3895],[2006.75,-14.246]],"d2":[[2005.25,5.047],[2005.75,1.0446],[2006.25,-0.1298],[2006.75,-6.976]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BINGAMAN","id":63,"d1":[[2005.25,-13.802],[2005.75,-11.39045],[2006.25,-13.9105],[2006.75,-13.052]],"d2":[[2005.25,3.16],[2005.75,2.52346],[2006.25,0.7445],[2006.75,-4.464]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DOMENICI","id":64,"d1":[[2005.25,11.181],[2005.75,10.90501],[2006.25,12.9819],[2006.75,9.016]],"d2":[[2005.25,-3.629],[2005.75,-3.08982],[2006.25,-0.253],[2006.75,1.232]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CLINTON","id":65,"d1":[[2005.25,-15.368],[2005.75,-13.92001],[2006.25,-14.7806],[2006.75,-13.731]],"d2":[[2005.25,4.721],[2005.75,2.36316],[2006.25,-0.5637],[2006.75,-5.337]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"SCHUMER","id":66,"d1":[[2005.25,-14.679],[2005.75,-13.7462],[2006.25,-14.9628],[2006.75,-13.552]],"d2":[[2005.25,4.824],[2005.75,2.28055],[2006.25,-0.1325],[2006.75,-5.041]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BURR","id":67,"d1":[[2005.25,12.21],[2005.75,12.00438],[2006.25,12.684],[2006.75,13.125]],"d2":[[2005.25,-0.981],[2005.75,-0.28526],[2006.25,0.3616],[2006.75,9.129]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"DOLE","id":68,"d1":[[2005.25,12.097],[2005.75,10.80464],[2006.25,13.0046],[2006.75,12.972]],"d2":[[2005.25,-4.308],[2005.75,-0.96235],[2006.25,0.5384],[2006.75,8.961]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CONRAD","id":69,"d1":[[2005.25,-12.191],[2005.75,-6.4314],[2006.25,-12.3492],[2006.75,-7.608]],"d2":[[2005.25,5.343],[2005.75,4.57568],[2006.25,1.1604],[2006.75,0.143]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DORGAN","id":70,"d1":[[2005.25,-14.256],[2005.75,-10.40432],[2006.25,-14.5331],[2006.75,-8.393]],"d2":[[2005.25,6.855],[2005.75,6.66753],[2006.25,0.5599],[2006.75,2.316]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DEWINE","id":71,"d1":[[2005.25,6.761],[2005.75,7.05191],[2006.25,2.8789],[2006.75,-0.125]],"d2":[[2005.25,-7.579],[2005.75,-6.37561],[2006.25,-8.8682],[2006.75,-6.392]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"VOINOVICH","id":72,"d1":[[2005.25,9.4],[2005.75,8.48275],[2006.25,8.9063],[2006.75,6.051]],"d2":[[2005.25,-4.566],[2005.75,-3.96508],[2006.25,-1.0529],[2006.75,-1.505]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"INHOFE","id":73,"d1":[[2005.25,11.665],[2005.75,10.90353],[2006.25,13.4319],[2006.75,13.044]],"d2":[[2005.25,-0.227],[2005.75,1.94112],[2006.25,3.8314],[2006.75,9.973]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"COBURN","id":74,"d1":[[2005.25,11.59],[2005.75,11.09845],[2006.25,12.0849],[2006.75,12.926]],"d2":[[2005.25,-0.979],[2005.75,0.6075],[2006.25,3.9532],[2006.75,9.781]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SMITHGORD","id":75,"d1":[[2005.25,9.452],[2005.75,8.22158],[2006.25,9.0118],[2006.75,7.725]],"d2":[[2005.25,-4.829],[2005.75,-5.40429],[2006.25,-3.7362],[2006.75,-0.863]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"WYDEN","id":76,"d1":[[2005.25,-14.448],[2005.75,-13.13916],[2006.25,-15.153],[2006.75,-13.862]],"d2":[[2005.25,5.081],[2005.75,1.5763],[2006.25,0.443],[2006.75,-4.944]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"SANTORUM","id":77,"d1":[[2005.25,12.686],[2005.75,11.14571],[2006.25,11.1769],[2006.75,11.429]],"d2":[[2005.25,-3.493],[2005.75,-1.55349],[2006.25,-2.3977],[2006.75,8.193]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"SPECTER","id":78,"d1":[[2005.25,4.457],[2005.75,4.16224],[2006.25,5.384],[2006.75,-0.904]],"d2":[[2005.25,-7.858],[2005.75,-5.83481],[2006.25,-7.1658],[2006.75,-8.249]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CHAFEE","id":79,"d1":[[2005.25,-2.173],[2005.75,-0.37671],[2006.25,-5.482],[2006.75,-4.334]],"d2":[[2005.25,-6.04],[2005.75,-9.27865],[2006.25,-7.9769],[2006.75,-7.75]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"REED","id":80,"d1":[[2005.25,-15.115],[2005.75,-14.67182],[2006.25,-15.118],[2006.75,-14.312]],"d2":[[2005.25,5.385],[2005.75,1.58342],[2006.25,0.3258],[2006.75,-4.118]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"DEMINT","id":81,"d1":[[2005.25,12.43],[2005.75,11.73877],[2006.25,13.5669],[2006.75,13.52]],"d2":[[2005.25,-1.029],[2005.75,-0.25438],[2006.25,2.9001],[2006.75,8.569]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"GRAHAM","id":82,"d1":[[2005.25,11.565],[2005.75,9.64245],[2006.25,13.1581],[2006.75,7.089]],"d2":[[2005.25,-4.098],[2005.75,-1.77195],[2006.25,1.8558],[2006.75,-2.276]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"THUNE","id":83,"d1":[[2005.25,11.649],[2005.75,7.94541],[2006.25,11.9592],[2006.75,13.446]],"d2":[[2005.25,-3.09],[2005.75,0.61319],[2006.25,0.5904],[2006.75,9.671]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"JOHNSON","id":84,"d1":[[2005.25,-10.272],[2005.75,-11.38419],[2006.25,-14.292],[2006.75,-11.363]],"d2":[[2005.25,1.302],[2005.75,2.97952],[2006.25,-0.777],[2006.75,-2.855]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"FRIST","id":85,"d1":[[2005.25,12.012],[2005.75,11.88607],[2006.25,12.9923],[2006.75,12.136]],"d2":[[2005.25,-2.538],[2005.75,-1.11556],[2006.25,0.9145],[2006.75,4.567]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"ALEXANDER","id":86,"d1":[[2005.25,11.902],[2005.75,10.43386],[2006.25,13.1296],[2006.75,11.5]],"d2":[[2005.25,-4.152],[2005.75,-3.79244],[2006.25,1.1541],[2006.75,4.195]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CORNYN","id":87,"d1":[[2005.25,12.034],[2005.75,11.74938],[2006.25,13.1146],[2006.75,13.262]],"d2":[[2005.25,-1.201],[2005.75,1.69673],[2006.25,2.5396],[2006.75,8.425]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"HUTCHISON","id":88,"d1":[[2005.25,11.25],[2005.75,10.82619],[2006.25,11.277],[2006.75,10.896]],"d2":[[2005.25,-4.073],[2005.75,-1.43531],[2006.25,-0.6548],[2006.75,5.594]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"BENNETT","id":89,"d1":[[2005.25,12.514],[2005.75,11.53815],[2006.25,13.0866],[2006.75,9.691]],"d2":[[2005.25,-3.659],[2005.75,-1.6205],[2006.25,0.5502],[2006.75,1.659]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"HATCH","id":90,"d1":[[2005.25,12.492],[2005.75,11.44573],[2006.25,12.8866],[2006.75,11.438]],"d2":[[2005.25,-3.977],[2005.75,-0.10503],[2006.25,-0.462],[2006.75,6.459]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"JEFFORDS","id":91,"d1":[[2005.25,-14.483],[2005.75,-12.20847],[2006.25,-14.9106],[2006.75,-13.117]],"d2":[[2005.25,3.662],[2005.75,2.0309],[2006.25,-0.901],[2006.75,-6.743]],"color":[[2005.25,"Others","#008000"],[2005.75,"Others","#008000"],[2006.25,"Others","#008000"],[2006.75,"Others","#008000"]]},{"name":"LEAHY","id":92,"d1":[[2005.25,-15.366],[2005.75,-14.2443],[2006.25,-15.0724],[2006.75,-14.19]],"d2":[[2005.25,4.978],[2005.75,1.41741],[2006.25,0.2156],[2006.75,-6.699]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"ALLEN","id":93,"d1":[[2005.25,11.866],[2005.75,10.71611],[2006.25,13.3839],[2006.75,12.048]],"d2":[[2005.25,-4.229],[2005.75,-2.41343],[2006.25,1.8444],[2006.75,8.654]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"WARNER","id":94,"d1":[[2005.25,11.115],[2005.75,8.44375],[2006.25,10.5654],[2006.75,7.56]],"d2":[[2005.25,-4.251],[2005.75,-5.15692],[2006.25,-1.7855],[2006.75,-3.141]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"CANTWELL","id":95,"d1":[[2005.25,-13.937],[2005.75,-13.57114],[2006.25,-14.4858],[2006.75,-13.333]],"d2":[[2005.25,4.264],[2005.75,0.98435],[2006.25,-0.2934],[2006.75,-6.048]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"MURRAY","id":96,"d1":[[2005.25,-14.618],[2005.75,-13.09563],[2006.25,-15.3441],[2006.75,-13.29]],"d2":[[2005.25,4.414],[2005.75,1.10833],[2006.25,0.1623],[2006.75,-6.169]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"BYRDROBER","id":97,"d1":[[2005.25,-12.892],[2005.75,-8.25019],[2006.25,-14.6647],[2006.75,-5.881]],"d2":[[2005.25,6.524],[2005.75,4.99712],[2006.25,-0.061],[2006.75,4.683]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"ROCKEFELLER","id":98,"d1":[[2005.25,-14.687],[2005.75,-12.44616],[2006.25,-14.3176],[2006.75,-12.973]],"d2":[[2005.25,4.907],[2005.75,2.86408],[2006.25,-0.382],[2006.75,-5.891]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"FEINGOLD","id":99,"d1":[[2005.25,-15.256],[2005.75,-13.08575],[2006.25,-15.3289],[2006.75,-11.5]],"d2":[[2005.25,4.809],[2005.75,2.59098],[2006.25,0.0561],[2006.75,-6.498]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"KOHL","id":100,"d1":[[2005.25,-13.223],[2005.75,-12.50664],[2006.25,-14.7076],[2006.75,-13.059]],"d2":[[2005.25,4.262],[2005.75,2.78267],[2006.25,-0.4263],[2006.75,-4.636]],"color":[[2005.25,"Democrats","#0000B0"],[2005.75,"Democrats","#0000B0"],[2006.25,"Democrats","#0000B0"],[2006.75,"Democrats","#0000B0"]]},{"name":"ENZI","id":101,"d1":[[2005.25,12.39],[2005.75,11.21904],[2006.25,13.6188],[2006.75,13.479]],"d2":[[2005.25,-2.147],[2005.75,1.45358],[2006.25,2.011],[2006.75,8.763]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]},{"name":"THOMAS","id":102,"d1":[[2005.25,12.073],[2005.75,11.27881],[2006.25,13.7576],[2006.75,12.855]],"d2":[[2005.25,-2.106],[2005.75,-0.02631],[2006.25,2.54],[2006.75,7.769]],"color":[[2005.25,"Republicans","#FF0000"],[2005.75,"Republicans","#FF0000"],[2006.25,"Republicans","#FF0000"],[2006.75,"Republicans","#FF0000"]]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment