-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
452 lines (446 loc) · 20.2 KB
/
index.html
File metadata and controls
452 lines (446 loc) · 20.2 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--styles-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" href="styles/customStyles.css" />
<title>NYU Stern School of Business - Rooms</title>
</head>
<body onload="waitLoad()">
<div id="load-screen"></div>
<div style = "display:none;" class="container-fluid animate-bottom" id = "containter-whole">
<header>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark" id = "Menu">
<a class="navbar-brand" href="#mapView">NYU</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#mapView">Map</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#dashboard">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#downloads">Downloads</a>
</li>
</ul>
</div>
</nav>
</header>
<div id ="mapView"></div>
<div class = "paddingNavBar" id = "navBarSpacing"></div>
<div class="row ">
<div class="col-lg-4 height-100-wrapper">
<div class="card configMapSidebar">
<div class="card-header">
<ul class="nav nav-pills card-header-pills" role = "tablist">
<li class="nav-item">
<a class="nav-link active" id = "map-find-tab" data-toggle = "tab"
href = "#find-tab">Find</a>
</li>
<li class="nav-item">
<a class="nav-link" id = "map-explore-tab" data-toggle = "tab"
href = "#explore-tab">Explore</a>
</li>
<li class="nav-item">
<a class="nav-link" id = "map-ranking" data-toggle = "tab"
href = "#ranking-rab">Ranking</a>
</li>
</ul>
</div>
<div class="card-body configMapSidebar">
<div class = "tab-content" id = "contents-map">
<div class = "tab-pane show fade active" id = "find-tab">
<div class = "jumbotron">
<h4 class = "display-4">Location</h4>
<p class = "lead">
Choose the neighborhood you want!
</p>
<div class = "form-group">
<label for = "boro-map">Borough</label>
<select class="form-control form-control-sm" id = "boro-map">
<option value = "0">Choose...</option>
</select>
<label for = "boro-dic-map">District</label>
<select class="form-control form-control-sm" id = "boro-dic-map" disabled="">
<option value = "0">Choose...</option>
</select>
</div>
<hr />
<h4>Show More</h4>
<p class = "lead">
Pick the data you want to see in the neighborhood chosen!
</p>
<div class = "form-row">
<div class = "col-lg-12">
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="1" id = "housing-enable" name = "data-pick"/>
<label class = "form-check-label" for ="housing-enable"><img class = "sm-icon iconHouse"/>Housing</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="2" id = "neighborhood-enable" name = "data-pick"/>
<label class = "form-check-label" for ="neighborhood-enable"><img class = "sm-icon iconNeighborhood"/>Neighborhoods</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="4" id = "museum-enable" name = "data-pick"/>
<label class = "form-check-label" for ="museum-enable"><img class = "sm-icon iconMuseum"/>Museums</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="8" id = "subs-enable" name = "data-pick"/>
<label class = "form-check-label" for ="subs-enable"><img class = "sm-icon iconSubs"/>Subways</label>
</div>
</div>
<div class ="col-lg-12 mt-1">
<button class = "btn btn-dark btn-lg btn-block" id = "show-data-map">Show/Hide Markers</button>
</div>
</div>
</div>
</div>
<div class = "tab-pane show fade" id = "explore-tab">
<div class = "jumbotron">
<h4 class = "display-4">Tools</h4>
<p class = "lead">
Explore the datasets!
</p>
<hr />
<p class = "lead">
Select the districts borders to be shown!
</p>
<div class = "form-group">
<div class = "row">
<div class = "col-lg-12">
<div class = "row">
<div class = "col-lg-6">
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="1" id = "manhattan-enable" name = "borough-pick"/>
<label class = "form-check-label" for ="manhattan-enable">Manhattan</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="2" id = "bronx-enable" name = "borough-pick"/>
<label class = "form-check-label" for ="bronx-enable">Bronx</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="4" id = "brooklyn-enable" name = "borough-pick"/>
<label class = "form-check-label" for ="brooklyn-enable">Brooklyn</label>
</div>
</div>
<div class ="col-lg-6">
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="8" id = "queens-enable" name = "borough-pick"/>
<label class = "form-check-label" for ="queens-enable">Queens</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="16" id = "staten-enable" name = "borough-pick"/>
<label class = "form-check-label" for ="staten-enable">Staten Island</label>
</div>
</div>
</div>
</div>
</div>
<button class = "btn btn-dark btn-lg btn-block mt-1" id = "show-borough">Show/Hide Borders</button>
</div>
<hr />
<p class="lead">
Markers
</p>
<div class = "form-row">
<div class = "form-group col-lg-12">
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="1" id = "housing-enable-2" name = "borough-pick-2"/>
<label class = "form-check-label" for ="housing-enable-2"><img class = "sm-icon iconHouse"/>Housing</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="2" id = "neighborhood-enable-2" name = "borough-pick-2"/>
<label class = "form-check-label" for ="neighborhood-enable-2"><img class = "sm-icon iconNeighborhood"/>Neighborhoods</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="4" id = "museum-enable-2" name = "borough-pick-2"/>
<label class = "form-check-label" for ="museum-enable-2"><img class = "sm-icon iconMuseum"/>Museums</label>
</div>
</div>
</div>
<button class = "btn btn-dark btn-lg btn-block mt-1" id = "show-data-explore">Show/Hide Markers</button>
<hr />
<p class = "lead">
Heatmaps!
</p>
<div class = "form-row">
<button class = "btn btn-dark btn-lg btn-block" id = "heat-crime">Show/Hide Crime</button>
</div>
</div>
</div>
<div class = "tab-pane show fade" id = "ranking-rab">
<div class = "jumbotron">
<h4 class = "display-4">Rankings</h4>
<p class = "lead">
Ranking of districts, pick one to visualize information*!
</p>
<div class="table-responsive table-hover" style="height:30vh;">
<table class = "table" id = "table-ranking-map"></table>
</div>
<hr />
<p class = "lead">
Markers
</p>
<div class = "form-row">
<div class = "col-lg-12">
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="1" id = "housing-enable" name = "data-pick-rank"/>
<label class = "form-check-label" for ="housing-enable"><img class = "sm-icon iconHouse"/>Housing</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="2" id = "neighborhood-enable" name = "data-pick-rank"/>
<label class = "form-check-label" for ="neighborhood-enable"><img class = "sm-icon iconNeighborhood"/>Neighborhoods</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="4" id = "museum-enable" name = "data-pick-rank"/>
<label class = "form-check-label" for ="museum-enable"><img class = "sm-icon iconMuseum"/>Museums</label>
</div>
<div class = "form-check">
<input class = "form-check-input" type="checkbox" value="8" id = "subs-enable" name = "data-pick-rank"/>
<label class = "form-check-label" for ="subs-enable"><img class = "sm-icon iconSubs"/>Subways</label>
</div>
</div>
<div class ="col-lg-12 mt-1">
<button class = "btn btn-dark btn-lg btn-block" id = "show-data-map-rank">Show/Hide Markers</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8">
<div class="row ">
<div class="col-lg-12">
<div class="rounded" id="mapContainer"></div>
</div>
</div>
<div class = "row">
<div class = "col-lg-12">
<div class = "card">
<div class = "card-header">Information</div>
<div class = "card-body">
<div class = "row">
<div class = "col-lg-8">
<div id = "bubbles-map-container" style="margin: 0 auto;"></div>
</div>
<div class = "col-lg-4">
<p class = "card-text">Legend:</p>
<div id = "conventions">
<p><div class = "color-box text-left" style = "background-color:#a0b100;"></div># Units</p>
<p><div class = "color-box text-left" style = "background-color:#2bb100;"></div># Crimes</p>
<p><div class = "color-box text-left" style = "background-color:#0079b1;"></div>Distance(mts.)</p>
<p><div class = "color-box text-left" style = "background-color:#b1005d;"></div># Museums</p>
<p><div class = "color-box text-left" style = "background-color:#b16300;"></div># Subways</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr/>
<div class="row" id = "dashboard">
<div class ="col-lg-12">
<div class ="jumbotron">
<h4 class = "display-4">Dashboard</h4>
<p class = "lead">
Click on the districts that you want to compare!
</p>
<div class = "row">
<div class="col-lg-6">
<div class="table-responsive table-hover" style="height:50vh;">
<table class = "table" id = "table-ranking-dashboard"></table>
</div>
<p class = "font-weight-light">* Check footer note for abbreviation ** Scores in this table calculated with data standarization</p>
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Crimes</h5>
<div id = "dashboard-bar-crimes" style="margin: 0 auto;">
<svg viewBox="0 0 670 350" preserveAspectRatio="xMidYMid" style="width: 100%;"><rect width="100%" height="100%" fill="#d1d1d1"></rect><text x="50%" y="50%" alignment-base="middle" text-anchor="middle" style="font-size: 100px; fill: rgb(121, 121, 121);">No-data</text></svg>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row justify-content-lg-center">
<div class="col-lg-auto">
<div id="legend-dashboard"></div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card-group">
<div class="card">
<div class="card-body">
<h5 class="card-title">Distance(mts.)</h5>
<div id="dashboard-distance-ring" style="margin:0 auto;">
<svg viewBox="0 0 670 350" preserveAspectRatio="xMidYMid" style="width: 100%;"><rect width="100%" height="100%" fill="#d1d1d1"></rect><text x="50%" y="50%" alignment-base="middle" text-anchor="middle" style="font-size: 100px; fill: rgb(121, 121, 121);">No-data</text></svg>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Units(houses)</h5>
<div id="dashboard-units-ring" style="margin:0 auto;">
<svg viewBox="0 0 670 350" preserveAspectRatio="xMidYMid" style="width: 100%;"><rect width="100%" height="100%" fill="#d1d1d1"></rect><text x="50%" y="50%" alignment-base="middle" text-anchor="middle" style="font-size: 100px; fill: rgb(121, 121, 121);">No-data</text></svg>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Museums</h5>
<div id="dashboard-museums-ring" style="margin:0 auto;">
<svg viewBox="0 0 670 350" preserveAspectRatio="xMidYMid" style="width: 100%;"><rect width="100%" height="100%" fill="#d1d1d1"></rect><text x="50%" y="50%" alignment-base="middle" text-anchor="middle" style="font-size: 100px; fill: rgb(121, 121, 121);">No-data</text></svg>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Subways(entrances)</h5>
<div id="dashboard-subways-ring" style="margin:0 auto;">
<svg viewBox="0 0 670 350" preserveAspectRatio="xMidYMid" style="width: 100%;"><rect width="100%" height="100%" fill="#d1d1d1"></rect><text x="50%" y="50%" alignment-base="middle" text-anchor="middle" style="font-size: 100px; fill: rgb(121, 121, 121);">No-data</text></svg>
</div>
</div>
</div>
</div>
</div>
</div>
<hr/>
<p class = "lead">
Top 10 by basic characteristics!
</p>
<div class = "row">
<div class="col-lg-12">
<div class="card-group">
<div class="card">
<div class="card-body">
<h5 class="card-title">Crimes(mts.)</h5>
</div>
<div class="table-responsive table-hover table-sm">
<table class = "table" id = "table-crimes-rank"></table>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Units(mts.)</h5>
</div>
<div class="table-responsive table-hover table-sm">
<table class = "table" id = "table-units-rank"></table>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Distance(mts.)</h5>
</div>
<div class="table-responsive table-hover table-sm">
<table class = "table" id = "table-distance-rank"></table>
</div>
</div>
</div>
<p class="font-weight-light">* Check footer note for abbreviation ** Scores in this table calculated with data standarization</p>
</div>
</div>
</div>
</div>
</div>
<hr/>
<div class="row" id = "downloads">
<div class="col-lg-12">
<div class="jumbotron">
<h4 class = "display-4">Downloads</h4>
<p class = "lead">
Pick a table explore it!, download it!
</p>
<div class="row justify-content-between">
<div class="col-lg-10">
<div class="btn-group-toggle downloads-select" data-toggle="buttons">
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="1" autocomplete="off"> Ranking
</label>
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="2" autocomplete="off"> Neighborhoods
</label>
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="3" autocomplete="off"> Housing
</label>
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="4" autocomplete="off"> Crimes
</label>
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="5" autocomplete="off"> Museums
</label>
<label class="btn btn-secondary btn-lg" style="margin-top: 5px;">
<input type="radio" name="options" value="6" autocomplete="off"> Subways
</label>
</div>
</div>
<div class="col-lg-2">
<a class="btn btn-info btn-lg" role="button" id = "download-btn">Download table</a>
</div>
</div>
<br>
<div class="row justify-content-lg-center">
<div class="col-lg-10">
<div class="table-responsive table-hover" style="height:70vh;">
<table class="table" id="table-downloads"></table>
</div>
<p class="font-weight-light">*** Table truncate to the first 100 values, to see the whole data, download it</p>
</div>
</div>
</div>
</div>
</div>
<hr/>
<footer class = "footer">
<div class = "containter-fluid">
<div class="row p-3">
<div class = "col-lg-4">
<span class = "text-muted">NYU - Stern School of Business Rooms by Edwin Mahecha</span>
<p class = "small">*Bor-Borough, Dic-District, D-Distance, A-Affordability, S-Safety, C-Culture, T-Transit,TScore-Total Score</p>
</div>
<div class = "col-lg-8">
<span class = "text-muted small">Icons by:</span>
<br>
<span class = "text-muted small">
<a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
</span>
<br>
<span class = "text-muted small">
<a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
</span>
<br>
<span class = "text-muted small">
<a href="https://www.flaticon.com/authors/alfredo-hernandez" title="Alfredo Hernandez">Alfredo Hernandez</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
</span>
</div>
</div>
</div>
</footer>
</div>
<!--javascript-->
<!--scripts from bootrstap page, in order to use button properties, animations, etc from bootstrap-->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!--d3JS -->
<script src = "https://cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.min.js"></script>
<!--Maps Api and personal custom scripts-->
<script src="scripts.js"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBMHFzrYVjHSWLl_bmaaLLraqi05CCnP_A&libraries=geometry,visualization&callback=onGoogleMapResponse"></script>
</body>
</html>