forked from YiwenDong98/Boston-Traffic-Visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsv.html
111 lines (108 loc) · 3.76 KB
/
csv.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<title>Boston Traffic Visualization</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="csvhelper.js" type="text/javascript"></script>
<script src="script.js" type="text/javascript"></script>
<style>
#header ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
#header li {
float: left;
}
#header li,
#header a {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
#header li,
#header a:hover {
background-color: #111;
}
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#content {
padding-top: 62px;
height: 100%;
}
#header{
height: 19px;
position: absolute;
z-index: 150;
width: 100%;
}
html, body {
margin: 0;
padding: 0;
}
#content div {
height: 200px;
overflow-y: auto;
margin: 20px;
}
#content ul {
list-style-type: none;
width: 90%;
}
#content h3 {
font: bold 20px/1.5 Helvetica, Verdana, sans-serif;
}
#content li {
padding: 10px;
overflow: auto;
}
</style>
</head>
<body>
<div id="header">
<ul>
<li><a href="index.html">Visualization</a></li>
<li><a href="Road_Hazards.html">Road Hazards Analysis</a></li>
<li><a href="taxi.html">Taxi Analysis</a></li>
<li><a href="csv.html">CSV</a></li>
</ul>
</div>
<div id="content">
<ul></ul>
<script>
var data =
[{name: "Traffic(MassDot)",
id: "traf",
url: "Data/Traffic_Data/flattened.csv"},
{name: "Accident(Waze)",
id: "waze",
url: "Data/Waze_Data/Accidents.csv"},
{name: "Hazards(Waze)",
id: "acc",
url: "Data/Waze_Data/General_Hazards.csv"},
{name: "Pot Holes(Waze)",
id: "hole",
url: "Data/Waze_Data/Pot_holes.csv"},
{name: "Road Close(Waze)",
id: "close",
url: "Data/Waze_Data/Road_closed_event.csv"},
{name: "Construction(Waze)",
id: "hole",
url: "Data/Waze_Data/Road_construction.csv"},
{name: "Taxi Routes",
id: "taxi",
url: "Data/Taxi_Data/filtered10.csv"}];
for (var d in data) {
$("#content").children().append("<li><h3>" + data[d].name + "</h3><div id=\"" + data[d].id + "\"></div><hr></li>");
generateTable(data[d].url, "#" + data[d].id);
}
</script>
</div>
</body>
</html>