-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
494 lines (431 loc) · 18.2 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="author" content="Martin Roberge" />
<meta name="keywords" content="HydroCloud, hydrology, stream gauges, USGS, data" />
<link rel="shortcut icon" href="resources/favicon.ico" />
<link href='https://fonts.googleapis.com/css?family=Vollkorn:700italic' rel='stylesheet' type='text/css'>
<title>HydroCloud</title>
<!-- jQuery, Bootstrap, Knockout, D3 -->
<script src="lib/jquery/jquery-2.0.2.js"></script>
<link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet">
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src='lib/knockout-3.0.0.js'></script>
<script src="lib/d3/d3.min.js"></script>
<script>
/* This is to collapse the navbar menu after a selection. */
$(document).ready(function () {
$(".close-nav").on("click", "a", function () {
$('.navbar-collapse.in').collapse('hide');
});
var feedbackModalDismiss = document.getElementById("feedback-modal-dismiss");
feedbackModalDismiss.addEventListener("touchstart", function () {
//console.log("touchstart registered.");
viewModel.toggleFeedback();
}, false);
});
</script>
<!-- My mapping files here. -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCxmwq7svGGXSeaXHsxfW27LDaXytc3nBY"></script>
<script src="src/index-drawMap.js"></script>
<!-- my graphing stuff here -->
<script src="src/graph-flowduration.js"></script>
<script src="src/graph-scatterChart.js"></script>
<!-- Local Data functions -->
<script src="src/requestData.js"></script>
<script src="src/dataProviders.js"></script>
<script src="src/local-storage.js"></script>
<script src="src/analysis.js"></script>
<!-- viewModel -->
<script src="src/viewModel.js"></script>
<script src="src/initialize.js"></script>
<!-- My styles here -->
<style>
body {
/*bootstrap sets the navbar height at 50px.*/
padding-top: 50px;
padding-bottom: 50px;
background-color: lightgray;
}
/*for google maps*/
html, body, #carousel-example-generic, .carousel-inner, .item {
height: 100%;
}
#brand {
font-family: 'Vollkorn', serif;
font-style: italic;
font-size: 24pt;
color: white;
text-shadow: 3px 3px 10px #aaf;
}
/*for carousel indicators */
.carousel-indicators {
position: absolute;
bottom: -50px;
color: #666;
}
.carousel-indicators :hover {
color: #bbb;
}
.carousel-indicators .active {
height: 20px;
width: 40px;
background-color: transparent;
color: white;
}
.carousel-indicators li {
/*override default behavior*/
text-indent: 0px;
height: 20px;
width: 40px;
border-style: none;
margin: 0;
font-size: 20px;
}
/*for my bottom button bar*/
#button-bar {
position: absolute;
bottom: 0px;
height: 50px;
width: 100%;
}
#button-bar a {
font-size: 30px;
color: #bbb;
bottom: 0px;
}
#button-bar a span {
vertical-align: middle;
}
#legend-btn {
color: white;
background-color: #444;
border-color: #444;
}
#legend-btn.active {
color: black;
background-color: #aaa;
}
#legend-modal {
position: absolute;
top: 80px;
right: 30px;
padding: 5px;
background-color: silver;
border: 1px solid black;
z-index: 50;
/*display: none;*/
}
#feedback-modal {
position: absolute;
top: 50px;
bottom: 0px;
width: 100%;
}
#feedback-modal-dismiss {
position: absolute;
top: 10px;
right: 30px;
z-index: 60;
font-size: 24pt;
font-family: sans-serif;
}
#feedback-modal-dismiss:after {
content:'';
position:absolute;
top:-10px; bottom:-10px;
left:-10px; right:-10px;
}
#feedback {
position: relative;
/*padding-bottom: 200%; */ /* (600 ÷ 300 = 200%) */
height: 100%;
overflow: hidden;
z-index: 55;
}
#feedback iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#help_div {
padding: 10px;
}
#help_directions li {
padding-bottom: 1em;
}
#stats_div {
padding: 10px;
}
.v-scroll{
overflow-y: auto;
}
/*For graphs*/
svg {
font: 10px sans-serif;
}
.axisTitle {
font: 14px serif;
}
.Title {
font: 20px serif;
}
.subTitle {
font: 12px serif;
}
path {
fill: none;
stroke-width: 2px;
}
/* keep the .filled selector for filled hydrographs.*/
.filled {
fill: skyblue;
}
path:hover {
stroke: red;
}
.axis path, .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.bar rect {
fill: lightskyblue;
shape-rendering: crispEdges;
}
.bar text {
fill: black;
}
.brush .extent {
stroke: #fff;
fill-opacity: .125;
shape-rendering: crispEdges;
}
svg .dataNotice {
font: 30px sans-serif;
fill: gray;
}
</style>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"> </span>
<span class="icon-bar"> </span>
<span class="icon-bar"> </span>
</button>
<a id="brand" class="navbar-brand" href="#">HydroCloud</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="close-nav" data-target="#carousel-example-generic" data-slide-to="0">
<a href="#" data-bind="click: map">Map</a>
</li>
<li class="dropdown" data-target="#carousel-example-generic" data-slide-to="1">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Graph <b class="caret"> </b></a>
<ul class="dropdown-menu">
<li class="close-nav">
<a href="#" data-bind="click: scatter">Hydrograph</a>
</li>
<li class="close-nav">
<a href="#" data-bind="click: flow">Flow Duration</a>
</li>
<li class="divider"></li>
<li class="close-nav">
<a href="#" data-bind="click: toggleLegend">Show Legend</a>
</li>
</ul>
</li>
<li class="close-nav" data-target="#carousel-example-generic" data-slide-to="2">
<a href="#">Stats</a>
</li>
<li class="close-nav" data-target="#carousel-example-generic" data-slide-to="3">
<a href="#"><strong>?</strong></a>
</li>
<li class="close-nav">
<a href="#" data-bind="click: toggleFeedback" class="glyphicon glyphicon-comment"></a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div id="button-bar" class="navbar-inverse">
<a href="#carousel-example-generic" data-slide="prev" data-bind="click: slide" class="pull-left"> <span class="glyphicon glyphicon-chevron-left"> </span> </a>
<div class="pull-right">
<button id="legend-btn" class="btn" data-bind="click: toggleLegend, css: { active: showLegend}">
<span class="glyphicon glyphicon-list-alt"> </span>
</button>
<a href="#carousel-example-generic" data-slide="next" data-bind="click: slide" class=""> <span class="glyphicon glyphicon-chevron-right"></span> </a>
</div>
</div>
<div id="legend-modal" data-bind="visible: showLegend">
<div class="modal-header">
<button type="button" class="close" id="legend-modal-dismiss" data-bind="click: toggleLegend" aria-hidden="true">
×
</button>
<h3 class="modal-title" id="myModalLabel">Legend</h3>
</div>
<div>
<p>
Click on a point to read its name and load its data.
</p>
<p>
<b>Sites:</b>
</p>
<ol data-bind="foreach: viewModel.siteDict">
<li>
<span data-bind="style: { color: $data.color}">█</span>
<span data-bind="text: $data.name"></span>
</li>
</ol>
</div>
</div>
<!-- Feedback Div -->
<div id="feedback-modal" data-bind="visible: showFeedback">
<div id="feedback" >
<button type="button" class="close" id="feedback-modal-dismiss" data-bind="click: toggleFeedback" aria-hidden="true">
X
</button>
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfKWrwbX0OHvfxIpfayTbUu8lm578X9Jig36JIH5RfZSY3dlw/viewform?embedded=true" width="300" height="600" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</div>
</div>
<!-- Main Carousel Content -->
<div id="carousel-example-generic" class="carousel slide" data-interval="false">
<!-- Indicators This is a built-in set of js and css that goes with the Bootstrap Carousel. Can't mess with it too much. -->
<ol class="carousel-indicators" id="bottom-nav">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active" data-bind="click: map">
<span class="glyphicon glyphicon-globe"> </span>
</li>
<li data-target="#carousel-example-generic" data-slide-to="1">
<span class="glyphicon glyphicon-stats"> </span>
</li>
<li data-target="#carousel-example-generic" data-slide-to="2">
<span class="glyphicon glyphicon-th-list"> </span>
</li>
<li data-target="#carousel-example-generic" data-slide-to="3">
<span class="glyphicon glyphicon-question-sign"> </span>
</li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active" id="map_div"></div>
<div class="item" id="graph_div"></div>
<div class="item v-scroll" id="stats_div">
<h3>Site Statistics</h3>
<p>
<span data-bind="text: viewModel.dataArray().length"> </span> sites selected
</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Site Name</th><th>Site ID</th><th>Watershed area (km<sup>2</sup>)</th><th>% Impervious</th>
</tr>
</thead>
<tbody data-bind="foreach: viewModel.siteDict">
<tr>
<td data-bind="text: $data.name"></td>
<td data-bind="text: $data.id"></td>
<td data-bind="text: $data.area"></td>
<td data-bind="text: $data.impervious"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="item v-scroll" id="help_div">
<h2>HydroCloud Instructions</h2>
<ul id="help_directions" class="list-unstyled">
<li><span class="glyphicon glyphicon-globe"></span> <strong>Map:</strong> The mapping page. This page defaults to a Google Maps interface using the topographic maps as a background and the current NEXRAD precipitation image as the foreground. Points represent USGS stream gages. By clicking on a point, the stream discharge and precipitation data for that site will be loaded into the system, where it can be viewed on the graphing page. Clicking on a point will also open a dialog box giving supplementary information about the site, including the name and ID# of the stream gage.</li>
<li><span class="glyphicon glyphicon-stats"></span> <strong>Graph:</strong> The graphing page. There are two graphs available:
<ul>
<li><strong>Hydrograph:</strong> Stream discharge, measured in cubic meters per second (cms) is plotted on a logarithmic Y axis. Time is plotted on the X axis. The tooltip displays the discharge and the name of the stream gage.</li>
<li><strong>Flow Duration:</strong> a plot of all stream discharge measurements in cms ordered by size, from largest to smallest. Stream discharge is plotted on the y axis in a logarithmic scale in scientific notation, so that "1e+2" equals 100 cms and "4e+3" = 4000 cms.</li>
</ul>
</li>
<li><span class="glyphicon glyphicon-th-list"> </span> <strong>Stats:</strong> The site statistics page. This lists each site that has been selected in the map view, along with some simple site statistics, including the USGS site # and the area of the watershed in square miles.</li>
<li><span class="glyphicon glyphicon-question-sign"> </span> <strong>Help:</strong> Takes you to this page.</li>
<li><span class="glyphicon glyphicon-comment"> </span> <strong>Chat:</strong> Opens a chat sidebar where you can ask for help or post your comments.</li>
<li><span class="glyphicon glyphicon-list-alt"> </span> <strong>Legend:</strong> Toggles the legend box, which will float over the current page. The legend lists all of the selected sites. Selected sites with no stream gage data will be listed here, but will not appear in the graph view.</li>
</ul>
<h3>Description of the HydroCloud project</h3>
<p>
HydroCloud is a web-based, mobile-friendly tool for visually browsing hydrology data.
Martin Roberge and Michael McGuire are the principal investigators for this project, which has been generously supported with a seed grant from the TU School of Emerging Technology.
</p>
<h3>Use us as a resource!</h3>
<p>HydroCloud is easy to <a href="https://github.com/mroberge/HydroCloud/wiki/Embed-HydroCloud">embed</a> in
your website, or you can <a href="https://github.com/mroberge/HydroCloud/wiki/Add-a-hydrograph-to-your-website">use our hydrograph</a>
to plot your own data!
</p>
<p>
We've created lots of <a href="https://github.com/mroberge/HydroCloud">tutorials</a>
that explain how to use us as a resource.
</p>
<h3>Contributors Welcome!</h3>
<p>
Do you have an <a href="https://github.com/mroberge/HydroCloud/issues">idea</a> for improving this website?
Do you have a <a href="https://mroberge.github.io/HydroCloud/station-list.html">dataset</a> that you would
like to <a href="https://github.com/mroberge/HydroCloud/wiki/Adding-More-Data-Providers">add</a> to our
collection? Come <a href="https://github.com/mroberge/HydroCloud">join us on GitHub!</a>
</p>
<p>
<strong><em>~~<a href="https://github.com/mroberge/HydroCloud/wiki/Contribute-to-HydroCloud">bug reports & pull requests welcome</a>~~</em></strong>
</p>
<p>
Visit our GitHub repository: <a href="https://github.com/mroberge/HydroCloud">https://github.com/mroberge/HydroCloud</a>
</p>
<h3>Data Sources</h3>
<small>
<p>HydroCloud thanks the following data providers:</p>
<ul>
<li>Base maps & associated data services
<ul>
<li>Street map, terrain map, map data: ©2017 Google </li>
<li>Satellite Base Map: Google Imagery ©2017 TerraMetrics</li>
<li>Google Street View ©2017 Google</li>
</ul>
</li>
<li>NEXRAD imagery © 2001-2017 Iowa State University Iowa Environmental Mesonet</li>
<li>Stream discharge data providers (<a href="station-list.html">list of stations</a>)
<ul>
<li>US discharge and station data courtesy of the U.S. Geological Survey</li>
<li>German discharge and station data ©2017 <a href="https://www.pegelonline.wsv.de">Wasserstraßen- und Schifffahrtsverwaltung des Bundes</a></li>
<li>UK sites use Environment Agency flood and river level data from the <a href="https://environment.data.gov.uk/flood-monitoring/doc/reference">real-time data API (Beta)</a></li>
</ul>
</li>
<li><a href="https://water.usgs.gov/lookup/getspatial?gagesII_Sept2011">GAGES-II</a> station data ©2011 James Falcone</li>
</ul>
</small>
</div>
</div>
</div>
<script>
initialize();
</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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73178522-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>