Comparing Andre Drummond's performance to the rest of the league
Created
November 11, 2015 16:59
-
-
Save ahwolf/81ab008a28bfb720f875 to your computer and use it in GitHub Desktop.
Andre Drummond is a beast
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
var data = []; | |
var width = 900; | |
var height = 550; | |
d3.csv("df_output.csv", function(csv_data) { | |
// make the data into an x y graph | |
var xy_data = [{ | |
key: "C", | |
values: [] | |
}, { | |
key: "PF", | |
values: [] | |
}] | |
_.each(csv_data, function(d, i) { | |
var values = { | |
x: +d.TRB, | |
y: +d.PTS, | |
player: d.Player, | |
size: d.sal_norm, | |
sal: d["2015-16"] | |
} | |
if (d.Pos === "PF") { | |
xy_data[1].values.push(values) | |
} else { | |
xy_data[0].values.push(values) | |
} | |
}); | |
nv.addGraph(function() { | |
var chart = nv.models.scatterChart() | |
.showDistX(true) | |
.showDistY(true) | |
.width(width) | |
.height(height) | |
.margin({ | |
top: 50, | |
right: 50, | |
bottom: 50, | |
left: 100 | |
}) | |
.useVoronoi(false) | |
//.interactive(false) | |
chart.xAxis | |
.axisLabel('Points per 36 minutes') | |
.tickFormat(d3.format('.1f')); | |
chart.yAxis | |
.axisLabel('Total rebounds per 36 minutes') | |
.tickFormat(d3.format('.1f')); | |
chart.tooltipContent(function(key, x, y, point) { | |
return '<h3>' + point.point.player + '</h3><p class="text-center">2015-16 Salary: <b>$' + (point.point.sal/1000000).toFixed(2) + 'mm</b></p>'; | |
}); | |
d3.select('#chart svg') | |
.attr('width', width) | |
.attr('height', height) | |
.datum(xy_data) | |
.transition().duration(500) | |
.call(chart); | |
return chart; | |
// chart.xAxis | |
// .axisLabel('Time (ms)') | |
// .tickFormat(d3.format(',r')); | |
// chart.yAxis | |
// .axisLabel('Voltage (v)') | |
// .tickFormat(d3.format('.02f')); | |
}); | |
}); |
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
Player | Pos | TRB | PTS | 2015-16 | sal_norm | ||
---|---|---|---|---|---|---|---|
0 | Andre Drummond | C | 18.8 | 18.7 | 3272091.0 | 12.281258418794067 | |
1 | Dwight Howard | C | 15.1 | 20.9 | 22359364.0 | 101.0 | |
2 | DeAndre Jordan | C | 14.9 | 11.4 | 19500000.0 | 87.70951184055453 | |
3 | Enes Kanter | C | 14.8 | 20.6 | 16400000.0 | 73.30053372714156 | |
4 | DeMarcus Cousins | PF | 14.7 | 28.5 | 14728844.0 | 65.53290462130323 | |
5 | Thomas Robinson | PF | 14.5 | 10.2 | 981300.0 | 1.6335302312445767 | |
6 | Tyson Chandler | C | 14.0 | 9.0 | 13000000.0 | 57.49713837694668 | |
7 | Hassan Whiteside | C | 13.9 | 18.7 | 981348.0 | 1.633753338002462 | |
8 | Alex Len | C | 13.6 | 16.1 | 3807120.0 | 14.768103951388012 | |
9 | Zaza Pachulia | C | 13.6 | 14.2 | 5200000.0 | 21.242290220617257 | |
10 | Tristan Thompson | PF | 13.6 | 11.5 | 14260870.0 | 63.357734581417326 | |
11 | Bismack Biyombo | C | 13.3 | 10.2 | 3000000.0 | 11.016563817549986 | |
12 | Drew Gooden | PF | 13.3 | 7.9 | 3300000.0 | 12.410981054331888 | |
13 | Tarik Black | C | 13.2 | 12.2 | 845059.0 | 1.0002742353899003 | |
14 | Jared Sullinger | PF | 13.2 | 19.4 | 2269260.0 | 7.620042312196633 | |
15 | Kenneth Faried | PF | 13.0 | 18.0 | 11235955.0 | 49.297755862083584 | |
16 | Ed Davis | PF | 12.9 | 9.3 | 7000000.0 | 29.60879364130866 | |
17 | Karl-Anthony Towns | C | 12.9 | 19.9 | 5703600.0 | 23.583051955428477 | |
18 | Rudy Gobert | C | 12.8 | 9.4 | 1175880.0 | 2.5379492510213177 | |
19 | Kevin Love | PF | 12.8 | 18.7 | 19500000.0 | 87.70951184055453 | |
20 | Dwight Powell | PF | 12.7 | 18.4 | 845059.0 | 1.0002742353899003 | |
21 | Clint Capela | C | 12.5 | 16.4 | 1242720.0 | 2.848625411376325 | |
22 | Tim Duncan | C | 12.5 | 14.2 | 5000000.0 | 20.312678729429326 | |
23 | Joakim Noah | C | 12.5 | 4.2 | 13400000.0 | 59.35636135932254 | |
24 | Kristaps Porzingis | PF | 12.5 | 17.8 | 4131720.0 | 16.276863401586027 | |
25 | Marreese Speights | PF | 12.5 | 18.0 | 3815000.0 | 14.804730644140816 | |
26 | Jonas Valanciunas | C | 12.5 | 18.8 | 4660482.0 | 18.7345795581036 | |
27 | Jordan Hill | PF | 12.1 | 12.7 | 4000000.0 | 15.664621273489656 | |
28 | Kevin Garnett | PF | 12.0 | 5.4 | 8500000.0 | 36.58087982521817 | |
29 | Joffrey Lauvergne | C | 12.0 | 20.2 | 1709720.0 | 5.019268243300151 | |
30 | Kyle O'Quinn | PF | 11.9 | 14.2 | 3750000.0 | 14.502606909504738 | |
31 | J.J. Hickson | C | 11.7 | 20.2 | 5613500.0 | 23.164261978648312 | |
32 | Luis Scola | PF | 11.6 | 12.6 | 3000000.0 | 11.016563817549986 | |
33 | Festus Ezeli | C | 11.3 | 17.7 | 2008748.0 | 6.409167568234878 | |
34 | JaMychal Green | PF | 11.3 | 14.7 | 845059.0 | 1.0002742353899003 | |
35 | LaMarcus Aldridge | PF | 11.2 | 18.5 | 19500000.0 | 87.70951184055453 | |
36 | Chris Bosh | PF | 11.1 | 20.5 | 22192730.0 | 100.22547559388696 | |
37 | Jon Leuer | PF | 11.0 | 15.0 | 1035000.0 | 1.883130916628537 | |
38 | Josh Smith | PF | 10.9 | 12.0 | 5400000.0 | 22.17190171180519 | |
39 | Josh Smith | PF | 10.9 | 12.0 | 1499000.0 | 4.039829576184543 | |
40 | Dewayne Dedmon | C | 10.8 | 10.3 | 947278.0 | 1.4753940204785976 | |
41 | Derrick Favors | PF | 10.8 | 18.0 | 11933333.0 | 52.53920887459188 | |
42 | Nerlens Noel | PF | 10.8 | 13.5 | 3457800.0 | 13.144444520879167 | |
43 | Anderson Varejao | C | 10.8 | 7.2 | 9638554.0 | 41.8729442339081 | |
44 | Pau Gasol | C | 10.7 | 16.5 | 7448760.0 | 31.694655905236147 | |
45 | David Lee | PF | 10.7 | 13.3 | 15493680.0 | 69.08790629367431 | |
46 | Aron Baynes | C | 10.6 | 11.1 | 6500000.0 | 27.28476491333883 | |
47 | Alexis Ajinca | C | 10.5 | 13.6 | 4300000.0 | 17.059038510271556 | |
48 | Amir Johnson | PF | 10.5 | 13.0 | 12000000.0 | 52.84908092100701 | |
49 | Kosta Koufos | PF | 10.5 | 12.1 | 7500000.0 | 31.932822369278497 | |
50 | Mason Plumlee | C | 10.4 | 13.6 | 1415520.0 | 3.6518097397627 | |
51 | Julius Randle | PF | 10.4 | 14.9 | 3132240.0 | 11.631222935523448 | |
52 | Zach Randolph | PF | 10.3 | 16.5 | 9638555.0 | 41.872948881965556 | |
53 | Greg Monroe | C | 10.2 | 19.6 | 16400000.0 | 73.30053372714156 | |
54 | Blake Griffin | PF | 10.1 | 28.9 | 18907725.0 | 84.95658361083785 | |
55 | Charlie Villanueva | PF | 10.0 | 17.6 | 1499187.0 | 4.040698762928804 | |
56 | Marvin Williams | PF | 10.0 | 11.9 | 7000000.0 | 29.60879364130866 | |
57 | Lavoy Allen | PF | 9.8 | 5.2 | 3700000.0 | 14.270204036707755 | |
58 | Willie Cauley-Stein | C | 9.7 | 10.9 | 3398280.0 | 12.867792141101638 | |
59 | Nene Hilario | PF | 9.7 | 13.0 | 13000000.0 | 57.49713837694668 | |
60 | Brandon Bass | PF | 9.6 | 12.0 | 3000000.0 | 11.016563817549986 | |
61 | Tobias Harris | PF | 9.6 | 17.7 | 16000000.0 | 71.44131074476569 | |
62 | Aaron Gordon | PF | 9.5 | 17.3 | 4171680.0 | 16.462599777525377 | |
63 | Al Jefferson | C | 9.5 | 20.2 | 13833333.0 | 61.37051804087725 | |
65 | Marcin Gortat | C | 9.4 | 13.5 | 11217391.0 | 49.21146932347152 | |
66 | Dirk Nowitzki | PF | 9.4 | 23.0 | 8333334.0 | 35.806206681266524 | |
67 | Nemanja Bjelica | PF | 9.3 | 11.1 | 4000000.0 | 15.664621273489656 | |
69 | Miles Plumlee | C | 9.2 | 11.0 | 2109294.0 | 6.876511153199788 | |
70 | Anthony Davis | PF | 9.1 | 24.4 | 7070730.0 | 29.937550745167275 | |
71 | Al Horford | C | 9.1 | 18.9 | 12000000.0 | 52.84908092100701 | |
72 | Ryan Kelly | PF | 9.1 | 8.6 | 1724250.0 | 5.0868045181349535 | |
73 | Nikola Vucevic | C | 9.1 | 17.9 | 11250000.0 | 49.36303782905225 | |
74 | Thaddeus Young | PF | 9.1 | 15.1 | 11200000.0 | 49.13063495625527 | |
75 | John Henson | C | 9.0 | 22.2 | 2943221.0 | 10.752651763259188 | |
76 | Paul Millsap | PF | 9.0 | 17.7 | 19000000.0 | 85.3854831125847 | |
77 | Trevor Booker | PF | 8.9 | 6.0 | 4775000.0 | 19.2668658018429 | |
78 | Taj Gibson | PF | 8.9 | 10.3 | 8500000.0 | 36.58087982521817 | |
79 | Roy Hibbert | C | 8.9 | 11.0 | 15500000.0 | 69.11728201679585 | |
80 | Kris Humphries | PF | 8.9 | 12.8 | 4600000.0 | 18.453455747053457 | |
81 | Ian Mahinmi | C | 8.9 | 10.8 | 4000000.0 | 15.664621273489656 | |
82 | Cody Zeller | C | 8.9 | 12.0 | 4204200.0 | 16.613754605992536 | |
84 | Paul George | PF | 8.7 | 23.6 | 17120106.0 | 76.64762778950845 | |
85 | David West | PF | 8.7 | 11.0 | 1499000.0 | 4.039829576184543 | |
87 | Serge Ibaka | PF | 8.6 | 14.3 | 12350000.0 | 54.47590103058589 | |
88 | Ryan Anderson | PF | 8.5 | 19.7 | 8500000.0 | 36.58087982521817 | |
89 | Draymond Green | PF | 8.5 | 12.0 | 14300000.0 | 63.53961306966825 | |
90 | Nikola Mirotic | PF | 8.5 | 18.4 | 5543725.0 | 22.83994376966012 | |
91 | Gorgui Dieng | C | 8.4 | 11.0 | 1474440.0 | 3.925673285066665 | |
92 | Brook Lopez | C | 8.4 | 22.2 | 20000000.0 | 90.03354056852436 | |
93 | Tiago Splitter | C | 8.4 | 12.5 | 8500000.0 | 36.58087982521817 | |
94 | Steven Adams | C | 8.2 | 8.9 | 2279040.0 | 7.6655003141157225 | |
95 | Darrell Arthur | PF | 8.2 | 6.8 | 2814000.0 | 10.152025130745209 | |
96 | Nikola Jokic | C | 8.2 | 14.5 | 1300000.0 | 3.1148661424525494 | |
98 | Timofey Mozgov | C | 8.1 | 13.6 | 4950000.0 | 20.08027585663234 | |
100 | Jonas Jerebko | PF | 7.9 | 12.0 | 5000000.0 | 20.312678729429326 | |
104 | Robin Lopez | C | 7.7 | 14.7 | 13000000.0 | 57.49713837694668 | |
105 | Kelly Olynyk | C | 7.7 | 16.6 | 2165160.0 | 7.136179531033314 | |
107 | Marc Gasol | C | 7.6 | 16.0 | 19700000.0 | 88.63912333174245 | |
115 | Jahlil Okafor | C | 7.3 | 21.1 | 4582680.0 | 18.372951391916583 | |
117 | Johnny O'Bryant | PF | 7.2 | 10.2 | 845059.0 | 1.0002742353899003 | |
118 | Jason Smith | C | 7.2 | 17.5 | 4300000.0 | 17.059038510271556 | |
119 | Brandan Wright | PF | 7.2 | 13.8 | 5500000.0 | 22.636707457399158 | |
121 | Markieff Morris | PF | 7.1 | 18.4 | 8000000.0 | 34.25685109724833 | |
125 | Noah Vonleh | PF | 7.0 | 5.3 | 2637720.0 | 9.332665562412163 | |
131 | Montrezl Harrell | PF | 6.6 | 16.6 | 1000000.0 | 1.7204489056706487 | |
132 | Jabari Parker | PF | 6.6 | 10.5 | 5152440.0 | 21.021228608012766 | |
133 | Myles Turner | C | 6.6 | 14.1 | 2357760.0 | 8.031395397047294 | |
136 | Jared Dudley | PF | 6.3 | 7.2 | 4250000.0 | 16.826635637474574 | |
139 | Spencer Hawes | PF | 6.3 | 10.3 | 5543725.0 | 22.83994376966012 | |
141 | Josh McRoberts | PF | 6.3 | 6.0 | 5543725.0 | 22.83994376966012 | |
147 | Mike Scott | PF | 6.0 | 13.7 | 3333333.0 | 12.565914753510723 | |
151 | Meyers Leonard | PF | 5.9 | 11.7 | 3075880.0 | 11.369258417306689 | |
154 | James Johnson | PF | 5.8 | 7.4 | 2500000.0 | 8.692535089580153 | |
159 | Richaun Holmes | PF | 5.7 | 12.8 | 1050000.0 | 1.952851778467632 | |
162 | Andrea Bargnani | C | 5.6 | 14.8 | 1362900.0 | 3.4072289564311546 | |
172 | Derrick Williams | PF | 5.4 | 23.9 | 4900000.0 | 19.84787298383536 | |
177 | Patrick Patterson | PF | 5.2 | 9.8 | 6268675.0 | 26.209553022343584 | |
182 | Ersan Ilyasova | PF | 5.1 | 11.0 | 7900000.0 | 33.792045351654366 | |
194 | Anthony Tolliver | PF | 4.9 | 6.1 | 3000000.0 | 11.016563817549986 | |
222 | Glenn Robinson III | PF | 4.2 | 13.2 | 845000.0 | 1.0 | |
227 | Frank Kaminsky | C | 4.0 | 12.6 | 2612500.0 | 9.215441553373365 | |
256 | Boris Diaw | PF | 3.5 | 11.6 | 7000000.0 | 29.60879364130866 | |
283 | Chris Copeland | PF | 2.9 | 15.4 | 1100000.0 | 2.1852546512646156 |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>NBA Bigs</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="page-header"> | |
<h1>Rebounding vs. Points per 36 minutes <small>size is salary</small></h1> | |
</div> | |
<hr> | |
<div id="chart"> | |
<svg></svg> | |
</div> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.11/d3.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js"></script> | |
<script src="d3_visual.js"></script> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment