-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
220 lines (195 loc) · 8.82 KB
/
index.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./bundle.js" charset="utf-8"></script>
<script src="https://use.fontawesome.com/c21ff7d00f.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-93796434-1', 'auto');
ga('send', 'pageview');
</script>
<link rel="stylesheet" href="./master.css">
<title>Data Don't Lie</title>
</head>
<body>
<header>
<h1>Data Don't Lie</h1>
<p>
Interactive visualization of NBA statistics
<a href="#" id="glossary-link">Glossary</a>
<a href="#" id="howto-link">Help</a>
</p>
</header>
<div id="main">
<div id="main-no-footer">
<aside id="sidebar">
<span id="attr-selector-clicker">Graph Properties</span>
<div id="attrSelectorForms" class="">
<ul>
<li>
<span id="pin-helper">Pin</span>
</li>
<li>
<label for="#attrX">X axis</label>
<div id="attrX">
<select class="graph-selector attr-selector">
</select>
<i class="fa fa-map-pin" aria-hidden="true"></i>
</div>
</li>
<li>
<label for="#attrY">Y axis</label>
<div id="attrY">
<select class="graph-selector attr-selector">
</select>
<i class="fa fa-map-pin" aria-hidden="true"></i>
</div>
</li>
<li>
<label for="#attrArea">Area</label>
<div id="attrArea">
<select class="graph-selector attr-selector">
</select>
<i class="fa fa-map-pin pinned" aria-hidden="true"></i>
</div>
</li>
</ul>
</div>
<span id="filter-clicker">Filters</span>
<div id="filter-container">
<div id="filters" class="">
<section id="pos-filters">
<div>
<label for="chkPG" class="pg">PG</label>
<input class="posFilter" type="checkbox" value="PG" id="chkPG" checked>
</div>
<div>
<label for="chkSG" class="sg">SG</label>
<input class="posFilter" type="checkbox" value="SG" id="chkSG" checked>
</div>
<div>
<label for="chkSF" class="sf">SF</label>
<input class="posFilter" type="checkbox" value="SF" id="chkSF" checked>
</div>
<div>
<label for="chkPF" class="pf">PF</label>
<input class="posFilter" type="checkbox" value="PF" id="chkPF" checked>
</div>
<div>
<label for="chkC" class="c">C</label>
<input class="posFilter" type="checkbox" value="C" id="chkC" checked>
</div>
</section>
<section>
<label for="year-filters">Seasons</label>
<span id="year-filters">
<select class="season-selector" id="start-season-selector">
</select>
to
<select class="season-selector" id="end-season-selector">
</select>
</span>
</section>
<button id="new-filter-button">Add filter</button>
<div id="span-filter-container"></div>
</div>
<form id="new-filter-form" class="hidden">
<select class="attr-selector filter" id="filter-attr">
</select>
<select id="comparator">
<option value="<="><=</option>
<option value="=">=</option>
<option value=">=">>=</option>
</select>
<input type="text" id="threshold">
<input type="Submit" value="Add Filter">
</form>
</div>
<label for="highlight-input">Highlight a Player</label>
<section>
<input id="highlight-input" placeholder="Type a name ('lebron', 'Yao Ming')"></input>
</section>
</aside>
<div id="chart-container">
<svg id="chart" width="970" height="560">
</svg>
</div>
</div>
<footer>
<p>
Check out my: <a href="http://github.com/hrb90">Github</a> <a href="https://www.linkedin.com/in/harrison-brown-a34540101/">LinkedIn</a> <a href="http://www.harrisonrbrown.com">Homepage</a>
</p>
<p>
All data courtesy <a href="http://basketball-reference.com">Basketball Reference</a>.
</p>
</footer>
</div>
<div id="glossary" class="hidden">
<i id="glossary-close" class="fa fa-times"></i>
<h2>Glossary</h2>
<section>
<h3>Basic stats</h3>
<p>
<b>PTS/G</b>, <b>AST/G</b>, <b>REB/G</b>, <b>STL/G</b>, <b>BLK/G</b>, and <b>TOV/G</b> refer to points, assists, total rebounds, steals, blocks, and turnovers per game respectively.
</p>
<p>
<b>FG%</b>, <b>3P%</b>, and <b>FT%</b> refer to field goal percentage, three point percentage, and free throw percentage, respectively.
</p>
<p>
For definitions of these standard box score statistics, please refer to <a href="https://en.wikipedia.org/wiki/Glossary_of_basketball_terms">Wikipedia</a>.
</p>
</section>
<section>
<h3>Advanced stats</h3>
For details on computation of these stats, please visit <a href="http://www.basketball-reference.com/about/glossary.html">
Basketball-Reference.
</a>
<h4>TS%</h4>
True Shooting percentage. An estimate of a player's overall scoring efficiency, taking into account field goals, 3-point field goals, and free throws.
<h4>3PAr</h4>
Three-point attempt rate. The proportion of a player's total field goal attempts that are three-point attempts.
<h4>AST%</h4>
Assist percentage. An estimate of the percentage of teammate field goals a player assisted while on the floor.
<h4>ORB%</h4>
Offensive rebound percentage. The percentage of missed opponent shots rebounded by the player.
<h4>DRB%</h4>
Defensive rebound percentage. The percentage of missed team shots rebounded by the player.
<h4>TRB%</h4>
Total rebound percentage. The overall percentage of missed shots rebounded by the player.
<h4>STL%</h4>
Steal percentage. The percentage of opponent possessions that end in a steal by the player.
<h4>BLK%</h4>
Block percentage. The percentage of opponent shots blocked by the player.
<h4>USG%</h4>
Usage percentage. The percentage of team possessions ended by the player with a field goal attempt, free throw attempts, or a turnover.
<h4>TOV%</h4>
Turnover percentage. Of the possessions ended by the player with a field goal attempt, free throw attempt, or turnover, the percentage that ended with a turnover.
</section>
</div>
<div id="how-to" class="hidden">
<i id="howto-close" class="fa fa-times"></i>
<p>
Data Don't Lie is an interactive data visualization of NBA statistics. Each circle on the chart represents a single NBA season from a single player.
</p>
<p>
You can change what variables we graph by selecting attributes from the dropdown lists in the "Graph Properties" section of the sidebar. DDL currently allows you to customize which variables represent the X-axis, the Y-axis, and the area of the circles.
</p>
<p>
You can also change how the data is filtered by using the tools in the "Filters" section of the sidebar. You can easily change the positions or seasons charted with the provided checkboxes and dropdowns. You can also add custom numeric filters by clicking the "Add Filter" button.
</p>
<p>
If you want to add more filters but don't want to change the scales, you can use the "pin" buttons next to the dropdown lists in the Graph Properties section.
</p>
<p>
You can highlight a player's seasons on the chart in grey by typing (part of) their name into the provided text box.
</p>
<p>
Hovering over a circle on the chart will show you the name and date of the player-season corresponding to that circle, along with data about the attributes you chose to graph.
</p>
</div>
</body>
</html>