-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathen4-fatalities.html
More file actions
177 lines (150 loc) · 6.59 KB
/
en4-fatalities.html
File metadata and controls
177 lines (150 loc) · 6.59 KB
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
<!DOCTYPE html>
<html>
<head>
<title>EN4: Fatalities</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/app.css" rel="stylesheet" media="screen">
<!--<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />-->
<link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.default.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.dataviz.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.dataviz.default.min.css" rel="stylesheet" />
<!-- <link type="text/css" rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css" media="all" />
-->
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.13/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.13/cartodb.js"></script>
<style type="text/css">
#map {
height: 300px;
width: 700px;
}
</style>
</head>
<body>
<h3 id="map_title">
Fatalities from Crashes 2000-2012
</h3>
<div class="row">
<div class="col-lg-12" id="EC8-B">
<div class="row">
<div class="col-lg-8 col-md-8">
<div class="map" id="map"> </div>
</div>
<div class="col-lg-4 col-md-4 map_chart_">
<div class="initial_map" style="font-size:16px; height: auto;">
</div>
<div id="en-b-title" class="map_info">
<div class="initial_map" style="font-size:16px; height:auto;">
<!--<div>Change year:</div>
<div id="en-b-select"></div>-->
<p>Zoom in to see more details, including individual fatality reports.
Select a report on the map for more information.</p>
</div>
</div>
<div id="ec-b-chart" style="float:left;width:100%;"></div>
</div>
</div>
</div>
</div>
<script type="text/template" id="template-map-legend">
<h3 style="margin-top: 0;">
<%= data.KILLED %> killed<% if (data.INJURED) { %>,
<%= data.INJURED %> injured
<% } %>
in <%= months[data.MONTH_] %> <%= data.YEAR_ %>
</h3>
<dl>
<dt>Location: </dt>
<dd><%= data.PRIMARYRD %> at <%= data.SECONDRD %></dd>
<dt>City: </dt>
<dd><%= data.CITY %></dd>
<dt>County: </dt>
<dd><%= data.COUNTY %></dd>
<dt>Time of day:</dt>
<dd><%= data.time %></dd>
<dt>Pedestrians killed:</dt>
<dd><%= data.PEDKILL %></dd>
<dt>Bicyclists killed:</dt>
<dd><%= data.BICKILL %></dd>
<dt>Motorists killed:</dt>
<dd><%= data.CARKILLED %></dd>
</dl>
<!--
<ul>
<% function pedSuffix(n) { if (n === 1) {return 'y';} return 'ies';} %>
<% function sSuffix(n) { if (n === 1) {return '';} return 's';} %>
<% if (data.PEDINJ) { %>
<li><%= data.PEDINJ %> pedestrian<%= sSuffix(data.PEDINJ) %> injured</li>
<% } %>
<% if (data.PEDKILL) { %>
<li><%= data.PEDKILL %> pedestrian<%= sSuffix(data.PEDKILL) %> killed</li>
<% } %>
<% if (data.BICINJ) { %>
<li><%= data.BICINJ %> cyclist<%= sSuffix(data.BICINJ) %> injured</li>
<% } %>
<% if (data.BICKILL) { %>
<li><%= data.BICKILL %> pedestrian<%= sSuffix(data.BICKILL) %> killed</li>
<% } %>
<% if (data.MCINJ) { %>
<li><%= data.MCINJ %> motorcyclist<%= sSuffix(data.MCINJ) %> injured</li>
<% } %>
<% if (data.MCKILL) { %>
<li><%= data.MCKILL %> motorcyclist<%= sSuffix(data.MCKILL) %> killed</li>
<% } %>
</ul>
-->
</script>
<script type="text/template" id="template-carto">
#ec_tracts {
polygon-fill: #FFFFB2;
polygon-opacity: 0.9;
line-color: #FFF;
line-width: 0.5;
line-opacity: 0.5;
}
#ec_tracts [ en_ped_killed_per_<%= year %> <= 0.11111111] {
polygon-fill: #843f1d;
}
#ec_tracts [ en_ped_killed_per_<%= year %> <= 0.00043022] {
polygon-fill: #bd5d21;
}
#ec_tracts [ en_ped_killed_per_<%= year %> <= 0.00028969] {
polygon-fill: #ec7429;
}
#ec_tracts [ en_ped_killed_per_<%= year %> <= 0.00022139] {
polygon-fill: #e19063;
}
#ec_tracts [ en_ped_killed_per_<%= year %> <= 0.00017679] {
polygon-fill: #ea9e77;
}
</script>
<hr>
<div id="en-a-city-select"></div>
<div id="en-a-county-select"></div>
<div class="btn-group btn-group-justified" style="margin-top:15px">
<a class="btn btn-primary btn-fix k-button active" id="fatalities">Fatalities</a><a class="btn btn-primary btn-fix k-button" id="per-capita">Fatalities per Capita</a><a class="btn btn-primary btn-fix k-button" id="per-mile">Fatalities per Vehicle Mile Traveled</a>
</div>
<div id="en-a-chart"></div>
<hr>
<div class="btn-group btn-group-justified" style="margin-top:15px">
<a class="btn btn-primary btn-fix k-button" id="en-c-fatalities">Fatalities</a><a class="btn btn-primary k-button btn-fix active" id="en-c-per-capita">Fatalities per Capita</a>
</div>
<div id="en-c-chart"></div>
<!-- libraries -->
<script src="http://code.jquery.com/jquery.js"></script>
<!--<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>-->
<!--<script type="text/javascript" src="https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js"></script>-->
<script src="http://cdn.kendostatic.com/2014.1.528/js/kendo.all.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.5.0/lodash.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/2.9.13/bluebird.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="js/esri-leaflet.js"></script>
<!-- From MTC server -->
<!-- <script src="http://dev-mtc-vital-signs.pantheon.io/sites/all/themes/vitalsigns/js/geocities.js"></script>-->
<script src="http://dev-mtc-vital-signs.pantheon.io/sites/all/themes/vitalsigns/js/colors.js"></script>
<script src="http://dev-mtc-vital-signs.pantheon.io/sites/all/themes/vitalsigns/js/science.v1.min.js"></script>
<script src="js/viz/en4a.js"></script>
<script src="js/viz/en4b.js"></script>
<script src="js/viz/en4c.js"></script>
</body>
</html>