-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
714 lines (645 loc) · 36.5 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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="para" content="Statistics and trends from data given by the San Francisco Fire Department.">
<meta name="author" content="Katherine Kolman">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>San Francisco Emergency Trends</title>
<!-- Styling -->
<link rel="stylesheet" href="style/main.css" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Chart.js, used for the charts and graphs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
<!-- MarkerClusterer.js, used for mapping incident locations -->
<script src="javascript/markerclusterer.js"></script>
<!-- My own JS files -->
<script src="javascript/parseCSV.js"></script>
<script src="javascript/utils.js"></script>
<script src="javascript/googleMaps.js"></script>
<script src="javascript/getCategoryData.js"></script>
<script src="javascript/mostLikelyDispatch.js"></script>
<script src="javascript/chartData.js"></script>
</head>
<body>
<div id="background_border">
<div id="banner">
<h1 id="page_title">San Francisco Emergency Response Data</h1>
</div>
<script>
//when the document loads, load up the first page
$(function() {
showTab("metrics");
});
</script>
<div id="nav_bar">
<ul>
<li class="tab_link" id="tab_1">Metrics / Trends</li>
<script>
$("#tab_1").click(function() {
showTab("metrics");
window.scrollTo(0, 0);
});
</script>
<li class="tab_link" id="tab_2">Emergency Prediction</li>
<script>
$("#tab_2").click(function() {
showTab("emergency_prediction");
window.scrollTo(0, 0);
});
</script>
<li class="tab_link" id="tab_3">Average Dispatch Data</li>
<script>
$("#tab_3").click(function() {
showTab("avg_dispatch_data");
window.scrollTo(0, 0);
showSlide(1);
updateHeatmap();
updateChart(avgDispatchChart, getAvgDispatchTime());
});
</script>
</ul>
</div>
<!-- Metrics / Trends tab -->
<div class="tab_content" id="metrics">
<div id="marker_map_border">
<div id="marker_map_label">Incident Locations</div>
<div id="map_side_content">
<!-- Checkboxes for the left side of the map -->
<div id="checkboxes">
<input type="checkbox" id="checkbox_1" class="checkbox" autocomplete="off"><label for="checkbox_1"></label>
<script>
$("#checkbox_1").click(function() {
showMarkers("alarm", 0, "checkbox_1");
});
</script>
<br />
<input type="checkbox" id="checkbox_2" class="checkbox" autocomplete="off"><label for="checkbox_2"></label>
<script>
$("#checkbox_2").click(function() {
showMarkers("citizen", 1, "checkbox_2");
});
</script>
<br />
<input type="checkbox" id="checkbox_3" class="checkbox" autocomplete="off"><label for="checkbox_3"></label>
<script>
$("#checkbox_3").click(function() {
showMarkers("elehaz", 2, "checkbox_3");
});
</script>
<br />
<input type="checkbox" id="checkbox_4" class="checkbox" autocomplete="off"><label for="checkbox_4"></label>
<script>
$("#checkbox_4").click(function() {
showMarkers("elerescue", 3, "checkbox_4");
});
</script>
<br />
<input type="checkbox" id="checkbox_5" class="checkbox" autocomplete="off"><label for="checkbox_5"></label>
<script>
$("#checkbox_5").click(function() {
showMarkers("fuel", 4, "checkbox_5");
});
</script>
<br />
<input type="checkbox" id="checkbox_6" class="checkbox" autocomplete="off"><label for="checkbox_6"></label>
<script>
$("#checkbox_6").click(function() {
showMarkers("gas", 5, "checkbox_6");
});
</script>
<br />
<input type="checkbox" id="checkbox_7" class="checkbox" autocomplete="off"><label for="checkbox_7"></label>
<script>
$("#checkbox_7").click(function() {
showMarkers("hazmat", 6, "checkbox_7");
});
</script>
<br />
<input type="checkbox" id="checkbox_8" class="checkbox" autocomplete="off"><label for="checkbox_8"></label>
<script>
$("#checkbox_8").click(function() {
showMarkers("medinc", 7, "checkbox_8");
});
</script>
<br />
<input type="checkbox" id="checkbox_9" class="checkbox" autocomplete="off"><label for="checkbox_9"></label>
<script>
$("#checkbox_9").click(function() {
showMarkers("odor", 8, "checkbox_9");
});
</script>
<br />
<input type="checkbox" id="checkbox_10" class="checkbox" autocomplete="off"><label for="checkbox_10"></label>
<script>
$("#checkbox_10").click(function() {
showMarkers("other", 9, "checkbox_10");
});
</script>
<br />
<input type="checkbox" id="checkbox_11" class="checkbox" autocomplete="off"><label for="checkbox_11"></label>
<script>
$("#checkbox_11").click(function() {
showMarkers("outfire", 10, "checkbox_11");
});
</script>
<br />
<input type="checkbox" id="checkbox_12" class="checkbox" autocomplete="off"><label for="checkbox_12"></label>
<script>
$("#checkbox_12").click(function() {
showMarkers("smoke", 11, "checkbox_12");
});
</script>
<br />
<input type="checkbox" id="checkbox_13" class="checkbox" autocomplete="off"><label for="checkbox_13"></label>
<script>
$("#checkbox_13").click(function() {
showMarkers("structfire", 12, "checkbox_13");
});
</script>
<br />
<input type="checkbox" id="checkbox_14" class="checkbox" autocomplete="off"><label for="checkbox_14"></label>
<script>
$("#checkbox_14").click(function() {
showMarkers("traffic", 13, "checkbox_14");
});
</script>
<br />
<input type="checkbox" id="checkbox_15" class="checkbox" autocomplete="off"><label for="checkbox_15"></label>
<script>
$("#checkbox_15").click(function() {
showMarkers("train", 14, "checkbox_15");
});
</script>
<br />
<input type="checkbox" id="checkbox_16" class="checkbox" autocomplete="off"><label for="checkbox_16"></label>
<script>
$("#checkbox_16").click(function() {
showMarkers("vehicle", 15, "checkbox_16");
});
</script>
<br />
<input type="checkbox" id="checkbox_17" class="checkbox" autocomplete="off"><label for="checkbox_17"></label>
<script>
$("#checkbox_17").click(function() {
showMarkers("water", 16, "checkbox_17");
});
</script>
</div>
<div id="checkbox_labels">
<span>Alarm</span><br />
<span>Citizen Assist / Service Call</span><br />
<span>Electrical Hazard</span><br />
<span>Elevator Rescue</span><br />
<span>Fuel Spill</span><br />
<span>Gas Leak (Natural and LP Gases)</span><br />
<span>HazMat</span><br />
<span>Medical Incident</span><br />
<span>Odor (Strange / Unknown)</span><br />
<span>Other</span><br />
<span>Outside Fire</span><br />
<span>Smoke Investigation (Outside)</span><br />
<span>Structure Fire</span><br />
<span>Traffic Collision</span><br />
<span>Train / Rail Incident</span><br />
<span>Vehicle Fire</span><br />
<span>Water Rescue</span><br />
</div>
</div>
<div class="map" id="marker_map"></div>
</div>
<script>
// This adds the fade in animation for the chart descriptions and
// initializes the charts with the appropriate data sets
// checks if the user has already scrolled past a certain point
// if this was not here, charts continually update on scroll every time
let alreadyScrolled = false;
$(window).scroll(function() {
if ($("#metrics").css("display") === "block") {
if ($("body, html")[0].scrollTop > 800) {
$("#avg_resol_time_para").css({
"transition": "opacity 1.5s",
"opacity": "1"
});
if (!alreadyScrolled) {
updateChart(resolutionTimeChart, getResolutionTime());
}
}
if ($("body, html")[0].scrollTop > 1600) {
$("#call_type_para").css({
"transition": "opacity 1.5s",
"opacity": "1"
});
}
if ($("body")[0].scrollTop > 2300 || $("html")[0].scrollTop > 2300) {
$("#incident_times_para").css({
"transition": "opacity 1.5s",
"opacity": "1"
});
if (!alreadyScrolled) {
updateChart(incidentTimeChart, getIncidentTimeData("alarm"));
updateButton("alarm_drp_btn");
alreadyScrolled = true;
}
}
}
});
</script>
<!-- Contains all the charts and graphs for the first deliverable -->
<div id="chart_info">
<script>
Chart.defaults.global.defaultFontFamily = "Montserrat";
Chart.defaults.global.defaultFontSize = 14;
</script>
<!-- Average resolution time chart and description -->
<div id="avg_resol_time" class="clearfix">
<canvas id="resolution_time_chart" width="800" height="650"></canvas>
<script>
var resolutionTimeChart = new Chart($("#resolution_time_chart"), {
type: "bar",
data: {
datasets: [{
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
label: "Average Minutes to Resolve Incident"
}],
labels: ["Alarms", "Citizen Assist / Service Call", "Electrical Hazard", "Elevator / Escalator Rescue", "Fuel Spill",
"Gas Leak (Natural and LP Gases)", "HazMat", "Medical Incident", "Odor (Strange / Unknown)", "Other",
"Outside Fire", "Smoke Investigation (Outside)", "Structure Fire", "Traffic Collision", "Train / Rail Incident",
"Vehicle Fire", "Water Rescue"
]
},
options: {
responsive: false,
scaleShowValues: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}],
xAxes: [{
ticks: {
autoSkip: false
}
}]
}
}
});
</script>
<p id="avg_resol_time_para">
This chart displays the average time it takes for emergency responders to become available again after arriving on scene,
organized by incident type. <br /> Train and rail incidents seem to take the longest to resolve, followed by building fires
and water rescues. However, note that because of the large differences in sample sizes, the data shown may be inaccurate for
certain types of incidents.
</p>
</div>
<!-- Call type chart and description -->
<div id="num_call_type" class="clearfix">
<p id="call_type_para">
This chart displays the number of occurences of each incident. Click on the labels to toggle each type of incident. <br />
The incident that overwhelmingly occurred the most was medical emergencies, followed by alarms and building fires.
</p>
<canvas id="call_type_chart" width="850" height="500"></canvas>
<script>
new Chart($("#call_type_chart"), {
type: "doughnut",
data: {
datasets: [{
data: [1061, 114, 21, 23, 10, 86, 3, 6791, 10, 129, 144, 15, 1029, 410, 55, 45, 54],
backgroundColor: [
"#d7e0e9", "#c3d1de", "#afc1d4", "#9bb2c9", "#87a3be", "#7394b3", "#5f84a9", "#4b759e", "#376693", "#235789",
"#20507d", "#1d4871", "#1a4064", "#173858", "#14304b", "#10283f", "#0d2032"
]
}],
labels: ["Alarms", "Citizen Assist / Service Call", "Electrical Hazard", "Elevator / Escalator Rescue", "Fuel Spill",
"Gas Leak (Natural and LP Gases)", "HazMat", "Medical Incident", "Odor (Strange / Unknown)", "Other",
"Outside Fire", "Smoke Investigation (Outside)", "Structure Fire", "Traffic Collision", "Train / Rail Incident",
"Vehicle Fire", "Water Rescue"
]
},
options: {
responsive: false,
legend: {
position: "right",
labels: {
fontColor: "black",
fontSize: 14,
padding: 14
}
}
}
});
</script>
</div>
<!-- Incident times chart and description -->
<div id="incident_times">
<canvas id="incident_time_chart" width="800" height="650"></canvas>
<!-- Dropdown menu for incident type -->
<div id="inc_times_drp">
<button id="inc_times_drp_btn">Incident Type</button>
<div id="inc_times_drp_btn_content">
<ul>
<li id="alarm_drp_btn">Alarm</li>
<script>
$("#alarm_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("alarm"));
updateButton("alarm_drp_btn");
});
</script>
<li id="citizen_drp_btn">Citizen Assist / Service Call</li>
<script>
$("#citizen_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("citizen"));
updateButton("citizen_drp_btn");
});
</script>
<li id="ele_haz_drp_btn">Electrical Hazard</li>
<script>
$("#ele_haz_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("elehaz"));
updateButton("ele_haz_drp_btn");
});
</script>
<li id="ele_rescue_drp_btn">Elevator / Escalator Rescue</li>
<script>
$("#ele_rescue_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("elerescue"));
updateButton("ele_rescue_drp_btn");
});
</script>
<li id="fuel_drp_btn">Fuel Spill</li>
<script>
$("#fuel_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("fuel"));
updateButton("fuel_drp_btn");
});
</script>
<li id="gas_drp_btn">Gas Leak (Natural and LP Gases)</li>
<script>
$("#gas_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("gas"));
updateButton("gas_drp_btn");
});
</script>
<li id="haz_drp_btn">HazMat</li>
<script>
$("#haz_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("hazmat"));
updateButton("haz_drp_btn");
});
</script>
<li id="med_inc_drp_btn">Medical Incident</li>
<script>
$("#med_inc_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("medinc"));
updateButton("med_inc_drp_btn");
});
</script>
<li id="odor_drp_btn">Odor (Strange / Unknown)</li>
<script>
$("#odor_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("odor"));
updateButton("odor_drp_btn");
});
</script>
<li id="other_drp_btn">Other</li>
<script>
$("#other_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("other"));
updateButton("other_drp_btn");
});
</script>
<li id="out_fire_drp_btn">Outside Fire</li>
<script>
$("#out_fire_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("outfire"));
updateButton("out_fire_drp_btn");
});
</script>
<li id="smoke_drp_btn">Smoke Investigation (Outside)</li>
<script>
$("#smoke_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("smoke"));
updateButton("smoke_drp_btn");
});
</script>
<li id="struct_fire_drp_btn">Structure Fire</li>
<script>
$("#struct_fire_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("structfire"));
updateButton("struct_fire_drp_btn");
});
</script>
<li id="traffic_drp_btn">Traffic Collision</li>
<script>
$("#traffic_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("traffic"));
updateButton("traffic_drp_btn");
});
</script>
<li id="train_drp_btn">Train / Rail Incident</li>
<script>
$("#train_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("train"));
updateButton("train_drp_btn");
});
</script>
<li id="vehicle_drp_btn">Vehicle Fire</li>
<script>
$("#vehicle_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("vehicle"));
updateButton("vehicle_drp_btn");
});
</script>
<li id="water_drp_btn">Water Rescue</li>
<script>
$("#water_drp_btn").click(function() {
updateChart(incidentTimeChart, getIncidentTimeData("water"));
updateButton("water_drp_btn");
});
</script>
</ul>
</div>
</div>
<script>
var incidentTimeChart = new Chart($("#incident_time_chart"), {
type: "line",
data: {
datasets: [{
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
label: "Number of Occurences",
}],
labels: ["12 AM", "1 AM", "2 AM", "3 AM", "4 AM", "5 AM", "6 AM", "7 AM", "8 AM", "9 AM", "10 AM", "11 AM",
"12 PM", "1 PM", "2 PM", "3 PM", "4 PM", "5 PM", "6 PM", "7 PM", "8 PM", "9 PM", "10 PM", "11 PM"
]
},
options: {
responsive: false,
scaleShowValues: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}],
xAxes: [{
ticks: {
autoSkip: false
}
}]
}
}
});
</script>
<p id="incident_times_para">
This graph displays the number of occurences of a certain incident type throughout the day. Again, due to the smaller
sample sizes for some incidents, there may be insufficient data for certain incident types to draw any meaningful
conclusions. However, there are some interesting trends that can be seen from this data; for example, there is a noticeable
increase in traffic collisions around 8AM and 5-6PM when people are going to and from work.
</p>
</div>
</div>
</div>
<!-- Emergency Prediction tab -->
<div class="tab_content" id="emergency_prediction">
<div id="geocode_map_border">
<div class="map" id="geocode_map"></div>
</div>
<div id="prediction">
<p id="pred_para">
Given an address and time, this attempts to predict the most likely dispatch that would be sent
to that area as well as the most likely emergency that would occur.
</p>
<input type="text" autocomplete="off" placeholder="123 Main Street" id="address_input">
<input type="text" autocomplete="off" placeholder="00:00 AM/PM" id="time_input">
<button id="pred_btn">Predict</button>
<script>
$("#pred_btn").click(findAddress);
</script>
<div id="pred_output_container">
<p id="pred_output"></p>
</div>
</div>
</div>
<!-- Average Dispatch Data tab -->
<div class="tab_content" id="avg_dispatch_data">
<canvas id="avg_dispatch_chart" width="800" height="600"></canvas>
<script>
var avgDispatchChart = new Chart($("#avg_dispatch_chart"), {
type: "bar",
data: {
datasets: [{
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
label: "Average Dispatch Time in Minutes"
}],
labels: ["94102", "94103", "94104", "94105", "94107", "94108", "94109", "94110", "94111", "94112", "94114",
"94115", "94116", "94117", "94118", "94121", "94123", "94124", "94127", "94129", "94130", "94131",
"94132", "94133", "94134", "94158"
]
},
options: {
responsive: false,
scaleShowValues: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}],
xAxes: [{
ticks: {
autoSkip: false
}
}]
}
}
});
</script>
<p id="avg_dispatch_para">
To the left is a graph displaying the average amount of time it takes to get to an emergency sorted by zipcode. The zipcode
with the longest dispatch time is 94130, followed by 94131 and 94105. These are Treasure Island, the Twin Peaks area, and the
Rincon Hill area respectively.
</p>
<div id="slideshow">
<button class="slide_btn" id="slide_left_btn">❮</button>
<script>
$("#slide_left_btn").click(function() {
incSlideNum(-1);
});
</script>
<div id="slide">
<div class="slide_content" id="treasure_island">
<img id="zip94130" src="images/zip94130.png" />
<span><em>Zipcode 94130</em></span>
<p>
Treasure Island only has one fire station located on the northern part of the island, and it is connected to San
Francisco only by the Oakland Bay Bridge. For small emergencies, one fire station may be sufficient, but for
bigger emergencies, having to call in other stations off the island would explain why dispatch times would be bigger.
Also, on the heatmap below, most of the emergencies occurred on the bottom part of the island on Yerba Buena. Since the
fire station is located on the northern part of the island, the travel time between these two places could also explain
why the dispatch times were longer.
</p>
</div>
<div class="slide_content" id="twin_peaks">
<img id="zip94131" src="images/zip94131.png" />
<span><em>Zipcode 94131</em></span>
<p>
The Twin Peaks area has no fire stations located in their zipcode district, but there are a few on the outskirts. This could
be a major reason that the dispatch times are longer in this area. Another reason could be the terrain; the hills and winding,
indirect roads would make it difficult for emergency vehicles to get to locations quickly.
</p>
</div>
<div class="slide_content" id="rincon_hill">
<img id="zip94105" src="images/zip94105.png" />
<span><em>Zipcode 94105</em></span>
<p>
The Rincon Hill area is located right off the connection of San Francisco and the Oakland Bay Bridge with two fire stations.
It is a densely populated area of the city, being in downtown San Francisco. Because of the sheer size of the population there,
more emergency calls would occur in that area, as well as generate large amounts of traffic, which would explain why dispatch
times are longer here.
</p>
</div>
</div>
<button class="slide_btn" id="slide_right_btn">❯</button>
<script>
$("#slide_right_btn").click(function() {
incSlideNum(1);
});
</script>
</div>
<div id="time_reduce">
<span id="reduce_header">How can dispatch times be <strong>reduced</strong>?</span>
<div id="reduce_para">
<p>
The most obvious solution for improving dispatch times would be creating more stations around the city, especially in denser parts
of the city such as the downtown area. However, other solutions may lie in improving traffic flows across the city so that
emergency vehicles can get to places more rapidly or creating more access points to locations by building more roads. <br />
</p>
<p>
To the right, a heatmap of all incidents is shown. It's clear that most of the emergencies occur in the downtown region of San
Francisco, so while it is important to have enough stations there to service the massive population in that region, it is also
important not to neglect the outer regions as there is still a need for strong dispatch centers, indicated by the pockets of
activity on the heatmap outside of the downtown area.
</p>
</div>
<div id="avg_dispatch_heatmap_border">
<div id="avg_dispatch_heatmap"></div>
</div>
</div>
</div>
<div id="bottom_bar">
<a href="https://github.com/katherinekolman/emergency-data-website" target="_blank">
<img src="images/GitHub-Mark-32px.png" />
</a>
</div>
</div>
<div id="bottom_image">
<img src="images/goldengatebridge.jpg" />
</div>
<!-- Google Maps API, used for mapping data -->
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA0cYEpHgp2dpM4w6ZMp8nlMHX5i1fA2xg&libraries=visualization,places&callback=initialize"></script>
</body>
</html>