-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreliability.html
More file actions
237 lines (209 loc) · 7.05 KB
/
reliability.html
File metadata and controls
237 lines (209 loc) · 7.05 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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html>
<head>
<title>Reliablity</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: 450px;
width: 80%;
}
.highway-sign {
paddding: 20px;
background: #62A60A;
border: 5px solid #fff;
color: #fff;
}
</style>
</head>
<body>
<h3 class="chart-title">
2014 Travel Time Reliability along Freeway Segments
</h3>
<div id="T9-B">
<div class="row">
<div class="col-sm-8">
<div class="map" id="mapt9b"></div>
</div>
<div class="col-sm-4" id="T9-B-info" style="background: #fff;">
<div class="row">
<div class="col-lg-12" id="T9-B-chart-wrapper">
<h4 id="timesliderheading">Time of day - 9am</h4>
<input class="slider" id="t9btimeslider" />
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="corridor-info-header">
<p>Select a segment on the map for more information.</p>
</div>
<div class="corridor-info-text"></div>
<div class="info legend" style="display:none;"></div>
</div>
</div>
</div>
</div><!-- end map row -->
<div class="row">
<div class="col-sm-12">
<p>
<a href="#" class="make-map-fullscreen">Increase map size</a>
<a href="#" class="reduce-map-size" style="display:none">Reduce map size</a>
</p>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<h4>Least reliable segments for AM peak</h4>
<h6>1. SR-242 southbound from SR-4 to I-680</h6>
<h6>2. US-101 northbound from SR-85 to I-280/I-680</h6>
<h6>3. I-680 southbound from SR-4 to SR-24</h6>
<h6>4. I-880 southbound from SR-92 to SR-84</h6>
<h6>5. I-80 westbound from MacArthur Maze to US-101</h6>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<h4>Least reliable segments for PM peak</h4>
<h6>1. US-101 northbound from SR-84 to SR-92</h6>
<h6>2. SR-13 northbound from SR-24 to I-580</h6>
<h6>3. I-280 southbound from SR-85 to US-101</h6>
<h6>4. I-880 southbound from I-80 to SR-92</h6>
<h6>5. I-80 eastbound from MacArthur Maze to I-580</h6>
</div>
</div><!-- end top 10 row -->
</div><!-- end t9b -->
<script type="text/template" id="map-legend-template">
<div class="highway-sign">
<h3 style="margin-bottom:0;"><%= corridor %> <%= longDirection %></h3>
<p><strong>Between <%= endpoint1 %> and <%= endpoint2 %></strong></p>
<p>BTI: <%= bti %> at <%= time %></p>
</div>
<div class="chart" id="corridor-chart" style="min-height: 250px;"></div>
</script>
<script type="text/template" id="reliability-template">
/** choropleth visualization */
#reliability_new {
polygon-opacity: 0;
line-color: #3d9cc8;
line-width: 3;
line-opacity: 1;
line-offset: -3;
[direction='EB'],
[direction='WB'] {
line-offset: 3;
}
[zoom<11] {
line-width: 2;
line-offset: -2;
[direction='EB'],
[direction='WB'] {
line-offset: 2;
}
}
[zoom=11] {
line-width: 4;
line-offset: -4;
[direction='EB'],
[direction='WB'] {
line-offset: 4;
}
}
[zoom=12] {
line-width: 5;
line-offset: -5;
[direction='EB'],
[direction='WB'] {
line-offset: 5;
}
}
[zoom=13] {
line-width: 6;
line-offset: -6;
[direction='EB'],
[direction='WB'] {
line-offset: 6;
}
}
[zoom=14] {
line-width: 7;
line-offset: -7;
[direction='EB'],
[direction='WB'] {
line-offset: 7;
}
}
} /* end #reliability_new */
#reliability_new [<%= time %> <= 10] {
line-color: <%= colors[4] %>;
}
#reliability_new [<%= time %> <= 1.49] {
line-color: <%= colors[3] %>;
}
#reliability_new [<%= time %> <= 0.99] {
line-color: <%= colors[2] %>;
}
#reliability_new [<%= time %> <= 0.49] {
line-color: <%= colors[1] %>;
}
#reliability_new [<%= time %> = 0],
#reliability_new [<%= time %> <= 0.24] {
line-color: <%= colors[0] %>;
}
[zoom <= 10] {
::outline {
[direction='SB'],
[direction='WB'] {
line-width: 2;
line-offset: 0;
line-color: #fff;
}
}
}
/*
#reliability_new[direction='SB'] {
line-color: red;
}
#reliability_new[direction='NB'] {
line-color: green;
}
#reliability_new[direction='EB'] {
line-color: yellow;
}
#reliability_new[direction='WB'] {
line-color: purple;
}
*/
</script>
<style type="text/css">
.fullscreen-map-container {
position: relative;
}
</style>
<!--
To select top AM & PM peaks, start with this SQL:
SELECT bti_pmpeak, corridor, direction, endpoint1, endpoint2 FROM reliability_new
where year = 2014
order by bti_pmpeak desc
limit 5
-->
<!-- 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/colors.js"></script>
<script src="js/viz/t9b.js"></script>
</body>
</html>