-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex3.html
34 lines (31 loc) · 928 Bytes
/
index3.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- D3 library -->
<script src="http://d3js.org/d3.v3.min.js"></script>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Bootstrap-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/bb-style3.css" type="text/css">
<script src="js/baseball3.js"></script>
<script type="text/javascript">
function draw(data) {
init_baseball(data);
};
</script>
</head>
<body>
<script type="text/javascript">
d3.csv("data/baseball_data.csv", function(d) {
d['height'] = +d['height'];
d['weight'] = +d['weight'];
d['heightweight'] = d['height'] / d['weight']
d['avg'] = +d['avg'];
d['HR'] = +d['HR'];
return d;
}, draw);
</script>
</body>
</html>