Last active
January 17, 2019 13:54
-
-
Save danharr/9830904 to your computer and use it in GitHub Desktop.
Predicting US Election using social data
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
license: mit |
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
$(function() { | |
$( "#slider" ).slider({ | |
value:37, | |
min: 1, | |
max: 37, | |
step: 1, | |
slide: function( event, ui ) { | |
function oct01() | |
{ | |
var mydata01 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,237.94], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,170.43], | |
["Nevada",15,329,2,185.345], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,197.905], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,153.945], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,291.32], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,599.825], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,448.32], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,467.945], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata01) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct02() { | |
var mydata02 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,237.94], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,185.345], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,197.905], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,153.945], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,291.32], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,599.825], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,448.32], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,467.945], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata02) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct03() | |
{ | |
var mydata03 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,237.94], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,185.345], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,174.355], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,153.945], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,270.125], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,599.825], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,448.32], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,458.525], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata03) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct04() | |
{ | |
var mydata04 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,215.175], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,319.58], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,479.72], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata04) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct05() | |
{ | |
var mydata05 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,215.175], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,319.58], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,479.72], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata05) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct06() | |
{ | |
var mydata06 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,215.175], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,319.58], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,479.72], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata06) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct07() | |
{ | |
var mydata07 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,343.915], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,495.42], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata07) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct08() | |
{ | |
var mydata08 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,343.915], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,495.42], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata08) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct10() | |
{ | |
var mydata10 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,331.355], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,319.58], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,162.58], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,252.855], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,407.5], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,534.67], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,500.13], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata10) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct09() | |
{ | |
var mydata09 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,270.125], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,280.33], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,162.58], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,162.58], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,343.915], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,495.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,486.785], | |
["West Virginia",800,536,1,671.26], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata09) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct11() | |
{ | |
var mydata11 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,343.915], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,162.58], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,280.33], | |
["New Hampshire",15,347,2,225.38], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,304.665], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,197.905], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,407.5], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,577.06], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,343.915], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata11) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct12() | |
{ | |
var mydata12 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,343.915], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,292.105], | |
["New Hampshire",15,347,2,304.665], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,304.665], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,448.32], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,577.06], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,331.355], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata12) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct13() | |
{ | |
var mydata13 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,304.665], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,292.105], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,483.645], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,407.5], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata13) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct14() | |
{ | |
var mydata14 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,304.665], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,455.385], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,407.5], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata14) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct15() | |
{ | |
var mydata15 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,455.385], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,652.42], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,407.5], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata15) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct16() | |
{ | |
var mydata16 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,304.665], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,455.385], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,589.62], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,407.5], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata16) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct17() | |
{ | |
var mydata17 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,292.105], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,461.665], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,589.62], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,397.295], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata17) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct18() | |
{ | |
var mydata18 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,292.105], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,448.32], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,652.42], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,589.62], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,397.295], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata18) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct19() | |
{ | |
var mydata19 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,292.105], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,471.085], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,630.44], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,417.705], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata19) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct20() | |
{ | |
var mydata20 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,292.105], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,630.44], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,448.32], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata20) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct21() | |
{ | |
var mydata21 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,292.105], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,630.44], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,448.32], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata21) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct22() | |
{ | |
var mydata22 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,174.355], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,319.58], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,292.105], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,522.895], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,661.055], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,630.44], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,448.32], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata22) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct23() | |
{ | |
var mydata23 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,138.245], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,270.125], | |
["New Hampshire",15,347,2,319.58], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,292.105], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,522.895], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,630.44], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,417.705], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata23) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct24() | |
{ | |
var mydata24 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,304.665], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,138.245], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,331.355], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,304.665], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,522.895], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,668.12], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,652.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,448.32], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata24) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct25() | |
{ | |
var mydata25 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,153.945], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,652.42], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,448.32], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata25) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct26() | |
{ | |
var mydata26 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,153.945], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,640.645], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,433.405], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata26) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct27() | |
{ | |
var mydata27 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,153.945], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,144.525], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,215.175], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,583.34], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,417.705], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata27) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct28() | |
{ | |
var mydata28 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,153.945], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,144.525], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,661.055], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,510.335], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,583.34], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,417.705], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata28) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct29() | |
{ | |
var mydata29 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,397.295], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,153.945], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,245.005], | |
["New Hampshire",15,347,2,343.915], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,280.33], | |
["Oregon",15,437,2,144.525], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,678.325], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,534.67], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,583.34], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,417.705], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata29) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct30() | |
{ | |
var mydata30 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,304.665], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,275.62], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,153.945], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,522.895], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,397.295], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata30) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function oct31() | |
{ | |
var mydata31 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,292.105], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,162.58], | |
["Nevada",15,329,2,215.175], | |
["New Hampshire",15,347,2,304.665], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,270.125], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,153.945], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,495.42], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,397.295], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydata31) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov01() | |
{ | |
var mydatan01 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,252.855], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,162.58], | |
["Nevada",15,329,2,197.905], | |
["New Hampshire",15,347,2,280.33], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,252.855], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,153.945], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,495.42], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,599.825], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,366.68], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan01) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov02() | |
{ | |
var mydatan02 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,381.595], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,237.94], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,162.58], | |
["Nevada",15,329,2,197.905], | |
["New Hampshire",15,347,2,280.33], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,153.945], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,495.42], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,560.575], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,366.68], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan02) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov03() | |
{ | |
var mydatan03 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,340.775], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,237.94], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,197.905], | |
["New Hampshire",15,347,2,270.125], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,483.645], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,560.575], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,366.68], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan03) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov04() | |
{ | |
var mydatan04 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,340.775], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,237.94], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,174.355], | |
["New Hampshire",15,347,2,270.125], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,162.58], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,225.38], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,483.645], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,560.575], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,353.335], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan04) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov05() | |
{ | |
var mydatan05 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,343.915], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,169.645], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,174.355], | |
["New Hampshire",15,347,2,280.33], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,237.94], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,15], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,174.355], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,461.665], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,560.575], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,343.915], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan05) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
function nov06() | |
{ | |
var mydatan06 = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,306.68], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,162.58], | |
["New Hampshire",15,347,2,290], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,190], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,174.355], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,505.42], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,617.095], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,331.355], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
svg.selectAll("text") | |
.data(mydatan06) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
} | |
if (ui.value == "1"){ | |
oct01(); | |
$('#obscore').html('319'); | |
$('#roscore').html('219'); | |
} | |
else if (ui.value == "2"){ | |
oct02(); | |
$('#obscore').html('319'); | |
$('#roscore').html('219'); | |
} | |
else if (ui.value == "3"){ | |
oct03(); | |
$('#obscore').html('321'); | |
$('#roscore').html('217'); | |
} | |
else if (ui.value == "4"){ | |
oct04(); | |
$('#obscore').html('323'); | |
$('#roscore').html('215'); | |
} | |
else if (ui.value == "5"){ | |
oct05(); | |
$('#obscore').html('315'); | |
$('#roscore').html('223'); | |
} | |
else if (ui.value == "6"){ | |
oct06(); | |
$('#obscore').html('315'); | |
$('#roscore').html('223'); | |
} | |
else if (ui.value == "7"){ | |
oct07(); | |
$('#obscore').html('314'); | |
$('#roscore').html('224'); | |
} | |
else if (ui.value == "8"){ | |
oct08(); | |
$('#obscore').html('314'); | |
$('#roscore').html('224'); | |
} | |
else if (ui.value == "9"){ | |
oct09(); | |
$('#obscore').html('312'); | |
$('#roscore').html('226'); | |
} | |
else if (ui.value == "10"){ | |
oct10(); | |
$('#obscore').html('304'); | |
$('#roscore').html('234'); | |
} | |
else if (ui.value == "11"){ | |
oct11(); | |
$('#obscore').html('300'); | |
$('#roscore').html('238'); | |
} | |
else if (ui.value == "12"){ | |
oct12(); | |
$('#obscore').html('297'); | |
$('#roscore').html('241'); | |
} | |
else if (ui.value == "13"){ | |
oct13(); | |
$('#obscore').html('298'); | |
$('#roscore').html('242'); | |
} | |
else if (ui.value == "14"){ | |
oct14(); | |
$('#obscore').html('294'); | |
$('#roscore').html('244'); | |
} | |
else if (ui.value == "15"){ | |
oct15(); | |
$('#obscore').html('295'); | |
$('#roscore').html('243'); | |
} | |
else if (ui.value == "16"){ | |
oct16(); | |
$('#obscore').html('296'); | |
$('#roscore').html('242'); | |
} | |
else if (ui.value == "17"){ | |
oct17(); | |
$('#obscore').html('294'); | |
$('#roscore').html('244'); | |
} | |
else if (ui.value == "18"){ | |
oct18(); | |
$('#obscore').html('296'); | |
$('#roscore').html('242'); | |
} | |
else if (ui.value == "19"){ | |
oct19(); | |
$('#obscore').html('296'); | |
$('#roscore').html('242'); | |
} | |
else if (ui.value == "20"){ | |
oct20(); | |
$('#obscore').html('291'); | |
$('#roscore').html('247'); | |
} | |
else if (ui.value == "21"){ | |
oct21(); | |
$('#obscore').html('291'); | |
$('#roscore').html('247'); | |
} | |
else if (ui.value == "22"){ | |
oct22(); | |
$('#obscore').html('289'); | |
$('#roscore').html('249'); | |
} | |
else if (ui.value == "23"){ | |
oct23(); | |
$('#obscore').html('291'); | |
$('#roscore').html('247'); | |
} | |
else if (ui.value == "24"){ | |
oct24(); | |
$('#obscore').html('288'); | |
$('#roscore').html('250'); | |
} | |
else if (ui.value == "25"){ | |
oct25(); | |
$('#obscore').html('289'); | |
$('#roscore').html('249'); | |
} | |
else if (ui.value == "26"){ | |
oct26(); | |
$('#obscore').html('289'); | |
$('#roscore').html('249'); | |
} | |
else if (ui.value == "27"){ | |
oct27(); | |
$('#obscore').html('290'); | |
$('#roscore').html('248'); | |
} | |
else if (ui.value == "28"){ | |
oct28(); | |
$('#obscore').html('291'); | |
$('#roscore').html('247'); | |
} | |
else if (ui.value == "29"){ | |
oct29(); | |
$('#obscore').html('290'); | |
$('#roscore').html('248'); | |
} | |
else if (ui.value == "30"){ | |
oct30(); | |
$('#obscore').html('288'); | |
$('#roscore').html('250'); | |
} | |
else if (ui.value == "31"){ | |
oct31(); | |
$('#obscore').html('291'); | |
$('#roscore').html('247'); | |
} | |
else if (ui.value == "32"){ | |
nov01(); | |
$('#obscore').html('294'); | |
$('#roscore').html('244'); | |
} | |
else if (ui.value == "33"){ | |
nov02(); | |
$('#obscore').html('299'); | |
$('#roscore').html('239'); | |
} | |
else if (ui.value == "34"){ | |
nov03(); | |
$('#obscore').html('297'); | |
$('#roscore').html('241'); | |
} | |
else if (ui.value == "35"){ | |
nov04(); | |
$('#obscore').html('297'); | |
$('#roscore').html('241'); | |
} | |
else if (ui.value == "36"){ | |
nov05(); | |
$('#obscore').html('299'); | |
$('#roscore').html('239'); | |
} | |
else if (ui.value == "37"){ | |
nov06(); | |
$('#obscore').html('303'); | |
$('#roscore').html('235'); | |
} | |
} | |
}); | |
//Width and height | |
var w = 1024; | |
var h = 670; | |
var mydata = [ | |
["California",15,95,2,15], | |
["Colorado",15,113,2,306.68], | |
["Connecticut",15,131,2,15], | |
["Delaware",15,149,2,15], | |
["District Of Columbia",15,167,2,15], | |
["Hawaii",15,185,2,15], | |
["Illinois",15,203,2,15], | |
["Iowa",15,221,2,225.38], | |
["Maine",15,239,2,15], | |
["Maryland",15,257,2,15], | |
["Massachusetts",15,275,2,15], | |
["Michigan",15,293,2,15], | |
["Minnesota",15,311,2,15], | |
["Nevada",15,329,2,162.58], | |
["New Hampshire",15,347,2,290], | |
["New Jersey",15,365,2,15], | |
["New Mexico",15,383,2,15], | |
["New York",15,401,2,15], | |
["Ohio",15,419,2,190], | |
["Oregon",15,437,2,15], | |
["Pennsylvania",15,455,2,146.88], | |
["Rhode Island",15,473,2,15], | |
["Vermont",15,491,2,15], | |
["Washington State",15,509,2,15], | |
["Wisconsin",15,527,2,174.355], | |
["Alabama",800,104,1,800], | |
["Alaska",800,122,1,800], | |
["Arizona",800,140,1,800], | |
["Arkansas",800,158,1,800], | |
["Florida",800,176,1,505.42], | |
["Georgia",800,194,1,800], | |
["Idaho",800,212,1,800], | |
["Indiana",800,230,1,800], | |
["Kansas",800,248,1,800], | |
["Kentucky",800,266,1,800], | |
["Louisiana",800,284,1,800], | |
["Mississippi",800,302,1,800], | |
["Missouri",800,320,1,800], | |
["Montana",800,338,1,800], | |
["Nebraska",800,356,1,800], | |
["North Carolina",800,374,1,617.095], | |
["North Dakota",800,392,1,800], | |
["Oklahoma",800,410,1,800], | |
["South Carolina",800,428,1,800], | |
["South Dakota",800,446,1,800], | |
["Tennessee",800,464,1,800], | |
["Texas",800,482,1,800], | |
["Utah",800,500,1,800], | |
["Virginia",800,518,1,331.355], | |
["West Virginia",800,536,1,800], | |
["Wyoming",800,554,1,800] | |
]; | |
var color = d3.scale.linear() | |
.domain([0,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800]) | |
.range(["white", "#1e0790", "#1e0790", "#1e0790", "#1e0790", "#1e0790", "#1e0790", "black", "#ad3201", "#ad3201", "#ad3201", "#ad3201", "#ad3201", "#ad3201", "#ad3201", "black"]); | |
var color2 = d3.scale.linear() | |
.domain([1,2]) | |
.range(["red","blue"]); | |
//Create SVG element | |
var svg = d3.select("body") | |
.append("svg") | |
.attr("width", w) | |
.attr("height", h); | |
svg.selectAll("states") | |
.data(mydata) | |
.enter() | |
.append("text") | |
.attr("x", function(d,i) { | |
return d[1]+8; | |
}) | |
.attr("y", function(d) { | |
return d[2]; | |
}) | |
.text(function(d) { | |
return d[0]; | |
}) | |
.attr("font-family", "Verdana") | |
.attr("font-size", "10px") | |
.attr("font-weight", "bold") | |
.attr("fill", function(d) { | |
return color(d[4]); | |
}) | |
.transition() | |
.duration(2000) | |
.attr("x", function(d) { | |
return d[4]+8; | |
}) | |
svg.selectAll("labels2") | |
.data(["Oct","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","Nov","02","03","04","05","06"] | |
) | |
.enter() | |
.append("text") | |
.attr("x", function(d,i) { | |
return 7.4+(25*i); | |
}) | |
.attr("y", function(d,i) { | |
return 9; | |
}) | |
.text(function(d) { | |
return d; | |
}) | |
.style("font-family", "'Open Sans'","tahoma","arial","calibri") | |
.style("fill","grey") | |
.style("font-size","10px") | |
}); | |
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 http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>US Socical Election</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> | |
<script type="text/javascript" src="election-data3.js"></script> | |
<link rel="stylesheet" type="text/css" href="styles.css" /> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css" /> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'> | |
<link href='http://fonts.googleapis.com/css?family=Codystar' rel='stylesheet' type='text/css'> | |
</head> | |
<body> | |
<p class = "SMD">Social listening to predict the next US President</p> | |
<p class="Obama">Obama</p> | |
<p class="Romney">Romney</p> | |
<div style="width:900px;margin:10px" id="slider"></div> | |
<p ID="obscore"> | |
303 | |
</p> | |
<p ID="roscore"> | |
235 | |
</p> | |
<p ID="col"> | |
: | |
</p> | |
<img class = "pitch" src="https://secure.i.telegraph.co.uk/multimedia/archive/02389/Social_media_US_el_2389450k.jpg" alt="pitch" > | |
<div id="scoreb"></div> | |
</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
@charset "utf-8"; | |
/* CSS Document */ | |
p.SMD { font-family: Verdana, Arial, Sans-Serif; font-size: 12px;color:white;white-space: normal;width:150px; margin-left:5px;} | |
p.SS { font-family: Verdana; font-size: 12px; position:absolute; top:160px; left:230px; } | |
p.SS1 { font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 15px; position:absolute; top:125px; left:30px; } | |
p.SS2 { font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 15px; position:absolute; top:225px; left:1050px; } | |
p#obscore { font-family: 'Codystar','Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 44px; color:yellow; position:absolute; top:0px; left:390px; margin-top:7px;} | |
p.Obama{ font-family: 'Codystar',Helvetica, Arial, Sans-Serif; font-size: 44px; position:absolute; top:0px; left:180px; color:orange; margin-top:7px; } | |
p.Romney{ font-family: 'Codystar',Helvetica, Arial, Sans-Serif; font-size: 44px; position:absolute; top:0px; left:580px; color:orange; margin-top:7px; } | |
p#roscore { font-family: 'Codystar','Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 44px; color:yellow; position:absolute; top:0px; left:490px; margin-top:7px;} | |
p#col { font-family: 'Codystar','Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 44px; color:yellow; position:absolute; top:0px; left:470px; margin-top:2px;} | |
p.Oct { font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 10px; position:absolute; top:90px; left:10px; text-align: justify;color:grey; } | |
p.Nov { font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 10px; position:absolute; top:90px; left:770px; text-align: justify; color:grey; } | |
/*p.Safe1{ font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 12px; font-weight:bold; position:absolute; top:162px; left:25px; text-align: justify; }*/ | |
/*p.Safe2{ font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 12px; font-weight:bold; position:absolute; top:162px; left:795px; text-align: justify; }*/ | |
/*p.Swing{ font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 12px; font-weight:bold; position:absolute; top:162px; left:422px; text-align: justify; }*/ | |
p#xyznews { font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; font-size: 12px; color:white; position:absolute; top:755px; } | |
div#banner1 { position: absolute; top: 260px; left: 130px; background-color: #009933; width:80px; height:550px; opacity:1; z-index:-1; } | |
div#banner2 { position: absolute; top: 260px; left: 210px; background-color: #009933; width:80px; height:550px; opacity:0.8; z-index:-1; } | |
div#banner3 { position: absolute; top: 260px; left: 290px; background-color: #009933; width:80px; height:550px; opacity:0.7; z-index:-1; } | |
div#banner4 { position: absolute; top: 260px; left: 370px; background-color: #009933; width: 80px;height:550px; opacity:0.6; z-index:-1; } | |
div#banner5 { position: absolute; top: 260px; left: 450px; background-color: #009933; width: 80px; height:550px; opacity:0.6; z-index:-1; } | |
div#banner6 { position: absolute; top: 260px; left: 530px; background-color: #009933; width: 80px; height:550px; opacity:0.7; z-index:-1; } | |
div#banner7 { position: absolute; top: 260px; left: 610px; background-color: #009933; width: 80px; height:550px; opacity:0.8; z-index:-1; } | |
div#banner8 { position: absolute; top: 260px; left: 690px; background-color: #009933; width: 80px; height:550px; opacity:1; z-index:-1; } | |
div#blbanner { position: absolute; top: 175px; left: 5px; background-color: #0066FF; width: 120px; height:550px; opacity:0.2; z-index:-1; } | |
div#rbanner { position: absolute; top: 175px; left: 775px; background-color: #0066FF; width: 120px; height:550px; opacity:0.2; z-index:-1; } | |
div#size { position: absolute; top: 0px; left: 0px; background-color: #FF3399; width: 940px; height:669px; opacity:0.51; z-index:-1; } | |
div#scoreb { position: absolute; top: 0px; left: 0px; background-color: black; width:940px; height:110px; opacity:1; z-index:-1; } | |
#b10, #b11, #b12, #b13, #b14, #b15, #b16, #b17, #b18, #b19 { position: absolute; top: 860px; } | |
#b10 { left:40px; } | |
#b11 { left:140px; } | |
#b12 { left:220px; } | |
#b13 { left:300px; } | |
#b14 { left:380px; } | |
#b15 { left:460px; } | |
#b16 { left:540px; } | |
#b17 { left:620px; } | |
#b18 { left:700px; } | |
#b19 { left:780px; } | |
#twitter { left:20px; top:20px; } | |
/* Button Styles | |
-----------------------*/ | |
button { | |
border-top: 1px solid #3773db; | |
background: #3773db; | |
background: -webkit-gradient(linear, left top, left bottom, from(#3773db), to(#3773db)); | |
background: -webkit-linear-gradient(top, #3773db, #3773db); | |
background: -moz-linear-gradient(top, #3773db, #3773db); | |
background: -ms-linear-gradient(top, #3773db, #3773db); | |
background: -o-linear-gradient(top, #3773db, #3773db); | |
padding: 10px 20px; | |
-webkit-border-radius: 0px; | |
-moz-border-radius: 0px; | |
border-radius: 0px; | |
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; | |
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0; | |
box-shadow: rgba(0,0,0,1) 0 1px 0; | |
text-shadow: rgba(0,0,0,.4) 0 1px 0; | |
color: white; | |
font-size: 20px; | |
font-family: 'Open Sans', Tahoma, Arial, Geneva, sans-serif; | |
text-decoration: none; | |
vertical-align: middle; | |
} | |
button:hover { | |
border-top-color: #28597a; | |
background: #28597a; | |
color: #ccc; | |
} | |
button:active { | |
border-top-color: #1b435e; | |
background: #1b435e; | |
} | |
img.pitch{ | |
position:absolute; | |
left:0px; | |
top:71px; | |
height:598px; | |
width:940px; | |
z-index:-1; | |
display:none; | |
opacity:1;} | |
img.mclogo{ | |
position:absolute; | |
left:810px; | |
top:0px; | |
opacity:1;} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment