Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bdilday
Last active December 4, 2015 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdilday/c1db5f00ef65f12dd9b7 to your computer and use it in GitHub Desktop.
Save bdilday/c1db5f00ef65f12dd9b7 to your computer and use it in GitHub Desktop.
d3js + joy divison + mlb HOF pca
<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<head>
<link href='https://fonts.googleapis.com/css?family=Amatic+SC:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Nunito:400,700' rel='stylesheet' type='text/css'>
<style>
body {
font: 10px sans-serif;
background:#000;
width:500px;
margin:0 auto;
}
img { float: left; }
svg { float: left; }
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.area { fill: black; }
.line {
stroke-width:1.5;
stroke:#eee;
}
g.select {
cursor:pointer;
}
text.chart-title {
font-family: 'Nunito', sans-serif;
}
</style>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
<script>
var margin = {top: 60, right: 20, bottom: 30, left: 50},
width = 500 - margin.left - margin.right,
height = 600 - margin.top - margin.bottom;
var x = d3.scale.linear()
.domain([0, 35])
.range([0, width]);
var y = d3.scale.linear()
.domain([2, -2])
.range([80, -80]);
var yoffset = d3.scale.linear()
.domain([0, 40])
.range([400, 0])
;
var area = d3.svg.area()
.x(function(d) { return x(d.x); })
.y0(height)
.y1(function(d) { return y(d.y); })
.interpolate('basis');
var mini_line = d3.svg.line()
.x(function(d, i) { return i * 5; })
.y(function(d) { return d * 5; })
.interpolate('basis');
var line = d3.svg.line()
.x(function(d) { return x(d.x); })
.y(function(d) { return y(d.y); })
.interpolate('basis');
var svg = d3.select("body").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 + ")");
var jitter = 1;
function sinw(cycle) {
return function (x) {
return Math.sin(x / cycle);
}
}
var waves = [
d3.range(0, 20).map(sinw(3)),
d3.range(0, 20).map(sinw(2)),
d3.range(0, 20).map(sinw(1))
];
d3.json('pca_2015.json', function(data) {
console.log("Data", data);
var mdata = _.map(data, function(datum, idatum) {
//console.log('datum', datum)
return _.map(datum.x, function(d, i) {
return {x : +datum.x[i], y0: yoffset(i), y: +datum.y[i]};
})
});
console.log('mdata', mdata)
var wave = svg.selectAll('g.wave').data(mdata);
var wave_enter = wave.enter()
.append('g')
.attr('class', 'wave')
;
wave_enter.append('path')
.attr('class', 'area');
wave_enter.append('path')
.attr('class', 'line');
wave.select('path.line')
.transition()
.duration(400)
.attr('transform', function(d, i) {
//console.log('translate(' + 0 + ',' + yoffset(i) + ')');
return 'translate(' + 0 + ',' + yoffset(i) + ')';
//return 'translate(' + 0 + ',' + 0 + ')';
})
.attr('d', line)
.attr('fill', 'black')
.style('fill', 'black')
;
svg.append('text')
.attr('class', 'chart-title')
.text('PRINCIPAL COMPONENTS - HOF 2015')
.style('font-size', 24)
.attr('x', -32)
.attr('y', 10)
.style('fill', 'white')
;
svg.selectAll('.player-label')
.data(data)
.enter()
.append('text')
.attr('class', 'player-label')
.text(function(d) {
console.log('id', d, d.id)
return d.id.replace('_2015','');
})
.attr('x', -5)
.attr('y', function(d, i) {
return yoffset(i)
})
.attr('text-anchor', 'end')
.style('fill', 'white')
.style('font-size', 6)
.style('')
;
});
</script>
[{"y": [0.0049990937203405143, -0.0083280617821576332, 0.01060478993759271, -0.0054603819467831946, 0.0033985876328769113, -0.00069252079117342697, -0.00019389983560249563, -0.0035553982715446318, 0.00047707497703626306, 0.017651915282572025, -0.0021348240273863415, -0.041227819436280649, 0.0049858165770555176, 0.021473980975724737, -0.0077142505151761211, -0.013828329962685439, 0.025581790484381042, 0.0019601777483633769, 0.0031648410401170176, 0.00017474561885355854, -0.027474142476470703, 0.13801582909863008, 0.66063486130111748, -0.67133130051522938, -0.29898191606126379, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Aaron Boone_2015"}, {"y": [0.14750673210356341, -0.021790575404303014, -0.32559888399878462, 0.43859229510907533, 0.30429646263673327, 0.25817807821753225, -0.60488502119090448, -0.26953760478322003, -0.19957242000180092, 0.035690802843981712, 0.076045931452499244, 0.05794475401064747, -0.012991118350609704, -0.0032492326212248956, 0.025015334078839921, 0.16274440509974725, -0.00062257849820498978, 0.036822923622159727, -0.032132666875499032, -0.014054948412168367, 0.025594799012322686, 9.2622824043047877e-05, 0.012724570509305616, -0.010378735411277568, 0.023557078692017175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Alan Trammell_2015"}, {"y": [-0.61084710093808736, 0.097847101814500737, -0.055607995342995646, 0.12390483442919742, -0.050518490563603233, 0.067576406330983385, -0.029400877328506381, 0.10281391804419453, -0.10532361038720955, 0.21500639667342439, 0.030511286716855747, -0.12921656970339301, -0.0097981701494057744, -0.014805025291106805, -0.11719109063731344, -0.040006630341080707, -0.011946374550372341, -0.0038352159994608399, 0.042797265352056801, 0.0046080298748262987, -0.0083196962382443077, -0.031317236330116453, -0.15417265324264745, -0.39745915823595501, 0.55217018666683093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Barry Bonds_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.93693464867549547, -0.18547693821943523, -0.13994614959655227, 0.11033831995096126, 0.14394025671253163, -0.12958026794721983, 0.13595019867519731, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Brian Giles_2015"}, {"y": [-0.0077421123031462258, -0.016171788587820313, 0.018289484710095061, -0.006208348150019305, 0.02567801668856079, 0.011784009979609548, 0.012255508034286888, 0.009127708487232794, 0.041084619750576049, -0.019681326229441687, -0.00668098153004619, -0.034659405650389337, 0.027171321250942904, -0.037837988771366099, -0.038565461241421739, -0.04667363472562519, 0.011952969407575842, -0.031433003219635422, -0.051633218980390458, -0.24589009476357501, 0.96111802910962107, 0.010696040003809151, 0.00045995805061930378, -0.030606474444275542, -0.0076646205559349131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Carlos Delgado_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.14194162629940699, 0.20147048774808751, -0.41477459091843716, -0.16665187160548772, 0.82227914219716203, 0.13047551044247441, 0.21513847445571643, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Cliff Floyd_2015"}, {"y": [0.060584971404856941, 0.070387131244643214, 0.27074686432970635, -0.14527653412648206, 0.043845170759486463, 0.16813545637062041, -0.08320398765810523, 0.23675460389681272, -0.2519319627135464, -0.024840473919309991, 0.73728427542098562, 0.055021200319780819, -0.33868166060755345, 0.14574750815964044, 0.16380856094351912, -0.080427496345235092, 0.13515770025182017, -0.041068895909949235, 0.055090626084285804, -0.0035179797459836382, 0.025638860534039742, 0.0065164950012438494, 0.0027034904311977193, 0.0023323417961736703, 0.011515032622402485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Craig Biggio_2015"}, {"y": [0.1259532086580667, 0.5091022239618791, -0.39954102403308384, -0.13435340436023202, 0.16655835995398627, -0.58360219803253521, 0.044598693396926792, -0.0038542621219763767, -0.095547086854937555, 0.29908387048180191, 0.098314587337540671, -0.036865741611683406, -0.19255213047932335, -0.13616432250057039, 0.080878114725066313, 0.036141148073814744, -0.021016856839945808, 0.03645569979574622, 0.026253600065577788, -0.01409346002640823, 0.032282209352776314, -0.0057907528962429233, 0.00242761302615771, -0.0028449452784813367, -0.010570034206597204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Curt Schilling_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.30542123558098444, 0.75852038697037982, 0.34889849758693942, -0.29139087365047911, 0.012462287351419521, 0.24240842970737453, -0.25653212886898125, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Darin Erstad_2015"}, {"y": [0.0035444578079144168, -0.053865534124173518, -0.003809925515229972, 0.065646733807243063, -0.030726993010085524, -0.035321674475092601, -0.027185161046233676, -0.00092153172889516966, 0.034768599557014439, 0.050322662044168798, 0.053520449576025447, 0.005095428365474941, -0.091336870871312564, 0.2853487906685262, 0.13843257888191224, -0.2868524075897072, -0.84113791050193321, 0.22740899506610687, -0.11451723405603806, -0.10557739721706381, -0.0094465652840952097, 0.091638935172005193, 0.0010677158419900579, 0.0024935168530946517, -0.0012268974870740246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Don Mattingly_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.081698105308131416, 0.25635146637765666, 0.28387442877732261, 0.65052236965580768, 0.32941789294742468, -0.53223393534582586, -0.17904242628830122, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Eddie Guardado_2015"}, {"y": [0.23009119448361559, 0.098195623622850003, 0.42559797788277193, 0.28891811455891508, -0.58611259709985808, -0.19540103832369543, -0.20102837600388124, -0.21174269139797036, -0.15680612072762284, 0.29322700388582346, -0.066086732997715739, -0.2791087227039924, -0.046712497349628596, -0.0025286479129837391, 0.052893043837773851, 0.035048470085223535, 0.065002862146952667, 0.030192892942768567, -0.0012203917313576285, 0.0080054470996695857, 0.029499395968630659, 0.0025275451953146733, -0.017580867698394592, 0.002085199342403754, 0.020123114586105939, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Edgar Martinez_2015"}, {"y": [0.12711475307869274, -0.088834441110374709, -0.1002255927329016, -0.15091475442085386, 0.16116608869795418, 0.10955167742191728, -0.0072502364191478763, -0.023147564286168043, -0.15165066378891046, -0.1361267779981909, -0.26639144340123183, -0.61339886492979545, -0.48487869038463066, 0.15588597440995164, -0.2922312236906236, -0.24499277585697332, 0.078859475134999441, -0.032206090067114834, 0.024832554848637819, 0.021369562608476431, -0.023470897556580994, 0.025211212188370961, -0.024582072083922324, 0.027684933630099634, 0.0099743810618890608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Fred McGriff_2015"}, {"y": [-0.07980339904537051, -0.07293656166741759, 0.02785864510882281, -0.13632153288520663, -0.0070849165880203652, 0.040613357913815651, -0.1638498437531905, 0.20584886151006937, 0.03951768256459149, -0.25003940881869319, -0.075798464025986653, -0.372029726130502, -0.078341943436417621, -0.49714416335928413, 0.55006287991956171, 0.28933520243850452, -0.14248043802384411, 0.13780482875391661, -0.034063143173759691, -0.081424439350330974, -0.02239266883775963, -0.029453142619115663, -0.0015739521364435127, -0.034272164455949619, 0.02445600533194954, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Gary Sheffield_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.040767181737798766, 0.31232999417402968, -0.081692318474159975, -0.35375657574689412, -0.23561793651853527, -0.64753768761595998, 0.54235578079179603, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Jack Morris_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.01964726633982361, 0.24422409832287886, -0.74752317671056034, 0.068525570487850795, -0.25266669654716073, -0.17845831722655581, -0.52990007611079515, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Jason Schmidt_2015"}, {"y": [-0.025550407893983395, 0.50273979930004797, 0.38742465825654138, -0.16197285789897881, 0.41688836475284496, 0.25032572422258048, 0.027820991388635696, -0.26109637462522928, 0.14427677198031066, 0.11773122960105836, -0.10510462065530954, -0.21450698319261066, 0.26607332284665619, 0.23314284008450106, 0.19016695094584146, 0.050410648972164199, 0.019749829847427694, 0.082595848048586579, -0.0078422375442600001, 0.021565515581599061, -0.0046835139012999516, 0.02493913470784892, -0.0047272744567997127, 0.018646241824731125, 0.02275991119315765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Jeff Bagwell_2015"}, {"y": [0.037935281367282081, -0.064349356352731674, 0.12927028843337313, -0.089961069500959959, 0.085694126501228401, 0.2891714112539206, 0.30330403465394518, -0.1155380552160689, -0.46265694543289726, 0.3298959070976018, -0.34608020141908236, 0.3681088269032135, -0.32725417552932623, -0.21870831334728685, 0.13205038962372428, 0.10174666890833048, -0.087758710696889758, 0.043055482876173307, 0.024427099115546136, -0.029349027323128732, 0.031540144476704904, -0.002605512722628156, 0.0051538882754292026, -0.018846959847533901, -0.0060717518645942992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Jeff Kent_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0011615070301432273, 0.35601019750738627, -0.20148877485442249, 0.56756069761439332, -0.27406292425603956, 0.41593011280291248, 0.5122735334909293, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Jermaine Dye_2015"}, {"y": [0.068996737881618961, 0.027217080554977208, 0.014453001467560688, -0.091364877547188333, 0.058486795241337347, -0.12511701916771761, -0.1463306913602177, 0.35142608647887064, -0.6450824154169692, -0.12087835189386031, -0.18236847239361337, -0.034805004525969283, 0.51920769041041781, 0.072306253225014203, 0.062403209369354617, -0.26106663677680286, -0.0018761571223334826, -0.023719329886794871, 0.078517227679463841, 0.037177459768085896, 0.012177441428517954, -0.0052358250354584898, -0.01817295578929496, 0.0060699813353521544, -0.035084828712793344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "John Smoltz_2015"}, {"y": [0.0019575825972099779, 0.053639175564169916, -0.0090909709904476461, 0.021070735976402383, 0.0069732080645582136, 0.11837737216161526, -0.085075297766352503, -0.20328882368889806, 0.16096922589458862, 0.067751917547501678, 0.044706375461025495, 0.059825685569154283, 0.026428883812847914, -0.47420885424760278, 0.16790857511334148, -0.7836455137549535, 0.10965150648011357, -0.11050009124831706, -0.033412145577759289, 0.048573735326368141, -0.04558151952075333, -0.0045704889528158099, -0.0087091930322075982, -0.0013855535370293991, -0.011630899934460502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Larry Walker_2015"}, {"y": [0.16270582339327871, -0.22862706779881042, 0.22322271232934957, 0.066119016629912916, 0.31400118517979186, -0.049682908811421796, -0.22262861910725384, 0.54011043294089411, 0.29678699352646631, 0.53910365753871847, -0.10874757673838753, -0.016757117809475534, -0.0077545139938173802, -0.084857569937762417, -0.13429990277909254, -0.015291173872964609, 0.0088434206012357117, -0.006905788529329937, 0.047372292467460164, -0.053236599509406846, -0.038996800537996146, 0.0049838893174886326, 0.011753127416053308, 0.037903306185960446, -0.0055292641198750603, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Lee Smith_2015"}, {"y": [-0.14383248622871406, -0.077409988145262579, -0.029478356739606807, 0.025186269480333347, -0.0022262981069548497, -0.18159049178219203, -0.1743133644210817, 0.041296840320138688, 0.11189714257577141, -0.025036158678022891, -0.30268141673791615, 0.16895724466148038, -0.23158687969526381, 0.42743834160266075, 0.53202845813773914, -0.069552752413329311, 0.160313156608344, -0.45970952415591365, -0.033097276489230831, 0.075505650660105783, 0.042035505865394715, 0.037807393161645816, -0.015283668829911622, -0.024269657167541786, 0.036864818408660099, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Mark McGwire_2015"}, {"y": [0.1637842763280207, 0.30299359913847923, -0.36235909974871472, -0.34291385684745496, -0.46270679604742204, 0.49102848886296763, -0.19532273648017515, 0.23852368453408707, 0.13998750463322843, 0.18458216768614497, -0.1028319219642657, 0.045682624735902073, 0.045428039419853079, 0.10255886764186325, -0.01047038691980845, 0.025635691906324518, -0.022651895562459889, -0.037148714207206453, 0.0099599512134617291, -0.0011569715273710424, 0.019282498900143406, 0.0030065485795717876, 0.0039796851458940435, 0.0042262466762965634, -0.011790924670478709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Mike Mussina_2015"}, {"y": [-0.12671943040141281, 0.35229300218978521, 0.33219517782478569, -0.11534977997241898, -0.0020874882479550547, -0.12626160354500446, -0.42734264925250059, 0.067056266837326586, 0.03786227141333004, -0.36324970787845817, -0.21410331283257433, 0.34116415235944492, -0.25090948505520105, -0.16155626675039572, -0.3506551744052282, 0.012618207861998246, -0.14336755426110395, -0.027107084208738738, 0.029803811540471528, -0.037827163554181586, -0.014780335607559106, -0.0099512878185827602, 0.0023021921865467448, -0.024342132186760179, -0.028161531572447607, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Mike Piazza_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.98710406461315037, -0.16007987263924539, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Moises Alou_2015"}, {"y": [0.0070467285076122373, -0.032133578989842038, 0.020031376888645883, -0.027875490154442479, 0.018931208000396438, -0.0021822069873851909, -0.031404466021886117, 0.037988446668023403, 0.023427866752936889, 0.016985154151036855, 0.015748730809318958, -0.0034854891727384377, -0.030445687508490273, -0.056416459101867961, -0.015423576942353336, 0.045545034970381301, -0.1177063285311038, 0.091081598447204593, -0.069924970121817503, 0.94968800431459244, 0.24110361446260783, 0.0077951838291867642, -0.0039947663176042271, -0.016046137161558928, -0.0038520676812792321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Nomar Garciaparra_2015"}, {"y": [-0.010263425287972817, 0.017069166565264308, 0.011574297948048144, -0.045099407085989578, -0.00055874205523180794, -0.01947060834234237, -0.0063546376274752825, 0.063374640105456112, -0.068527043683400471, 0.0066128549460686839, -0.00043200277124543879, 0.025260145381097096, 0.015643037935045519, -0.045844573988167811, -0.054212521466755356, 0.026909317073295729, 0.14247180328690687, 0.037598156474651694, -0.72271448338700628, -0.035924551453622035, -0.052133189713773107, 0.64405490800838516, -0.0079312587772983768, 0.075229290985784278, 0.11421986211286898, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Pedro Martinez_2015"}, {"y": [-0.0031278882464785425, 0.018825852791900098, 0.021144093467308923, -0.016331597188906911, 0.015736694869780764, -0.0054523778802120851, -0.0013271142032955715, 0.051203559178574762, -0.042035510339385518, 0.028326672189957353, -0.0087267147325977776, -5.849022384844628e-05, -0.017882860311109573, 0.061115505369443282, -0.024072043865280928, -0.026908668727711471, 0.046015259137697745, 0.030897184478457681, -0.65480054903283291, -0.030204245886352041, -0.036043012216023053, -0.73333510353540343, 0.016346472056159144, -0.09309236886911422, -0.085182877229793216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Randy Johnson_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.1600798726392455, -0.98710406461315059, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Rich Aurilia_2015"}, {"y": [-0.61319956456410696, 0.091607293231508291, -0.046765752440778838, 0.14301870992545548, -0.058086812206105794, 0.071582951229353098, -0.044650913753919629, 0.066280706170711232, -0.10251098419911325, 0.18773212182700244, 0.027862122365344771, -0.14457597561575497, -0.043419134148821877, -0.016312770328902271, -0.043680730216867608, 0.0021332411083819611, -0.0020028575132663615, -0.035292874110288024, -0.0041438065645868979, 0.010338304218667969, 0.010938301819187247, 0.03286547414773431, 0.1643753960941482, 0.41775606357318651, -0.54996444981151438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Roger Clemens_2015"}, {"y": [-0.10054373215863202, -0.045437996632179158, -0.04936593333598982, 0.0055634396270785834, -0.049002921558992128, -0.067236984746223305, -0.086162839622387202, 0.052957440152754193, 0.069179689647867956, -0.039378200233239485, -0.13547007059650912, 0.15721118454122593, -0.11279909350303474, 0.19166868743186605, 0.14457274398125475, -0.16181486417910079, 0.37178046503178569, 0.82155511654794655, 0.085506701054646819, -0.01893044324292497, 0.034111899908059982, -0.0027595941608085485, -0.0023733075587622525, 0.01218504412581823, -0.0094514835914598586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Sammy Sosa_2015"}, {"y": [0.16372533206039955, 0.39101643040024575, -0.021859045993076094, 0.64888265225716968, 0.0097615097762792733, 0.16717025320102327, 0.3514985229712867, 0.39550931144317009, 0.057215945100642346, -0.23351894261220058, -0.10168934086294827, -0.0045070335395876434, -0.11152086142710323, -0.017967137835218801, 0.066147619177218314, -0.057309847265287622, 0.020747267165019095, -0.012199347810992156, -0.006954216373602112, 0.033342432013667343, 0.0033430958295531089, 0.016224134790514121, 0.010412603694536331, -0.0055909894896860541, 0.0038430937967253108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Tim Raines_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Tom Gordon_2015"}, {"y": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Tony Clark_2015"}, {"y": [-0.0035728192087387221, -0.0035695365505302099, -0.00060994993367519124, 0.016879973832893858, 0.015177653832093546, 0.015731402041963549, 0.00046971874026624017, 0.0012392045590141343, 0.017637259433873509, 0.023077139620198476, 0.017767416358549823, -0.012764643878541895, -0.0025882653886027118, 0.0071816663193878128, -0.0009279343034056392, 0.022073170470137571, 0.014225426509151491, 0.0035400221219227257, -0.01516762312710199, -0.009400356378270705, -0.022331185587971869, 0.11676932702332472, -0.71440379729784764, -0.44234622518629663, -0.52595716875944021, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "id": "Troy Percival_2015"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment