forked from usf-cs360-spring2020/midterm-chinchillas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enrique.html
253 lines (213 loc) · 10.1 KB
/
enrique.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- TODO: Change title -->
<title>Chinchillas</title>
<!-- Load Bulma from CDN (consider saving it to repository instead) -->
<!-- https://bulma.io/ -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<!-- <link rel="stylesheet" href="https://unpkg.com/bulmaswatch/cyborg/bulmaswatch.min.css"> -->
<link rel="stylesheet" href="styleE.css">
<script src="https://d3js.org/d3.v5.min.js"></script>
<!-- Load Font Awesome 5 (free) icons -->
<script defer src="https://use.fontawesome.com/releases/v5.10.2/js/all.js"></script>
<!-- loads legend -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.25.6/d3-legend.js"></script>
<script src="enrique.js"></script>
</head>
<body>
<!-- Page header -->
<!-- https://bulma.io/documentation/layout/hero/ -->
<section class="hero is-primary is-bold">
<div class="hero-body">
<div class="container">
<!-- TODO: Change title -->
<h1 class="title">Midterm Project</h1>
<!-- TODO: Change subtitle -->
<h2 class="subtitle">By: Ned Azar, Enrique Bascur, and Jaden Hamid </h2>
</div>
</div>
</section>
<!-- End page header -->
<!-- Page navigation -->
<!-- https://bulma.io/documentation/components/navbar/ -->
<nav class="navbar is-light" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<!-- TODO: Change link to repository homepage if needed -->
<!-- TODO: Change which navbar-item is-active if needed -->
<a class="navbar-item" href="index.html">
<span class="icon"><i class="fas fa-home"></i></span>
<span>Home</span>
</a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="main-menu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="main-menu" class="navbar-menu has-text-weight-medium">
<!-- Left navbar items -->
<div class="navbar-start">
<a class="navbar-item" href="data.html" title="Data">
<span class="icon"><i class="fas fa-table"></i></span>
<span>Data</span>
</a>
<!-- TODO: Modify or remove dropdown -->
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
<span class="icon"><i class="fas fa-fire-alt"></i></span>
Visualizations
</a>
<div class="navbar-dropdown">
<a href="ned.html" class="navbar-item">
<span class="icon"><i class="fas fa-chart-line"></i></span>
<span>Ned's Chart</span>
</a>
<a href="enrique.html" class="navbar-item">
<span class="icon"><i class="fas fa-chart-area"></i></span>
<span>Enrique's Chart</span>
</a>
<a href="jaden.html" class="navbar-item">
<span class="icon"><i class="fas fa-chart-bar"></i></span>
<span>Jaden's Chart</span>
</a>
</div>
</div>
</div>
<!-- Right navbar items -->
<div class="navbar-end">
<!-- TODO: Update as needed -->
<a class="navbar-item" href="" title="About">
<span class="icon"><i class="fas fa-tasks"></i></span>
<span>Grade</span>
</a>
<a class="navbar-item" href="about.html" title="About">
<span class="icon"><i class="fas fa-info-circle"></i></span>
<span>About</span>
</a>
</div>
</div>
</div>
</nav>
<!-- End page navigation -->
<section class="section">
<div class="container">
<!-- Begin page content -->
<div class="content">
<h2>Enrique</h2>
<h2>Data wrangling</h2>
<p>For data wrangling in this prototype we selected a five year range to see if we could find a change in the SFFD over time. This was done on the<a href="https://data.sfgov.org/Public-Safety/Fire-Department-Calls-for-Service/nuek-vuh3"> Data SF</a> website with their data filter tool.</p>
<p>For this particular prototype I made an average response time using the <bold>DATEDIFF('minute',[INTIME], [OUTTIME])</bold> tool in tableau, having the [INTIME] be the dispatch time and date, and the [OUTTIME] be the onscene arrival of the response unit.
This was reduced to be measured in minutes.</br>
I also reduced the call type to be just <bold>medical incident</bold>, which is the majority of SFFD call types, and reduced the call type group to be just <bold>life threatening</bold> and<bold> nonlife threatening</bold>. Thee were also done in tableau.
<h2>Prototype</h2>
<img src="img/Dashboard 1.png" width="960px" height="500px"> </img>
<img src="img/stackbarproto.png" width="960px" height="500px"> </img>
<h2>Planned Interactivity</h2>
<h3>Side by Side Bar Chart</h3>
<p> For interactivity for this bar graph I intend to use a tooltip to have the relevant information show up when hovering over the bar, and highlight the bar in either the <bold>life threatening</bold> or <bold>nonlife threatening</bold> category, and compare it to it's yearly counterpart, while fading the other bars to grey.</p>
<h3>Stacked Bar Chart</h3>
<p>For the stacked bar chart I would simply highlight the bar it was on and put a tooltip on it so as to wasily see the average response time, since it's harder to differentiate on a stacked bar chart. </p>
<h2>Group Feedback</h2>
<table class="table is-hoverable is-striped">
<thead>
<tr>
<th>Feedback</th>
<th>Corrections</th>
</tr>
</thead>
<tbody>
<tr>
<td>The chart does not need as many colors.</td>
<td>Colors were reduced to two, one for each call type group.</td>
</tr>
<tr>
<td>Label for minutes was not clear.</td>
<td>Labeled the y-axis with a minute label.</td>
</tr>
<tr>
<td>Chart title needed to be added.</td>
<td>Added a chart title in the svg.</td>
</tr>
<tr>
<td>Data could be interpreted in months instead of years.</td>
<td>Data interpreted per month for the same five year period.</td>
</tr>
</tbody>
</table>
<h2>D3 Implementation</h2>
<script type="text/javascript">
d3.csv("enriqueData.csv").then(drawBarchart);
</script>
<svg id="barChart" width = "970" height = "700"></svg>
</br>
</br>
<h2>Interactivity</h2>
<p>The interactivity added to this barchart includes a tooltip when hovering over bars, a grey out of all other bars, except it's
corresponding month in the second bar chart when hovering over a specific bar, and a highlight and grey out of the specific
bar-chart when hovering over the legend.</p>
<h2>Data</h2>
<p> The data from this chart is the data divided by months for the 2015 to 2019 range of the medical call types, and they were
grouped by the group types of "non life threatening" and "potentially life threateneing". The data was also adjusted for december 2019,
which was giving response times in negative minutes. We may have to delve a little deeper to see if SFFD have time-travelling Response
trucks, but until it's confirmed, the data has been adjusted to not include those numbers.</p>
<h2>Interpretation</h2>
<p>Looking at the chart there is clearly a lag in response time when the medical incident call is non-life threatening,
understandably so since there is no extreme urgency to get to the call. There is a significant increase in response time when
there is a life threatening medical incident.
In general over the months the non life threatening response time does not vary too much, nor does it vary much for the potentially Life
threatening calls, there is a diffenrece between this and the prototype, after having cleaned up a negatice response time value for the month of december 2019. </br>
Decrease in resposne time between life threatening and non-life threatening calls is possibly due to sirens being on or not.</p>
<h2>Inspiration </h2>
<p> <a href="https://observablehq.com/d/68ffb053bdd161b9" target="blank">From Sophie's in class interactivity lab.<a></p>
<p> <a href = "https://d3-legend.susielu.com/#color"target="blank">d3 Legend Builder</p>
</section>
</section>
<!-- Page footer -->
<!-- https://bulma.io/documentation/layout/footer/ -->
<footer class="footer">
<div class="content has-text-centered is-size-7">
<p>
<a href="#top">
<span class="fas fa-arrow-up"></span>
<span class="has-text-weight-medium">Back to Top</span>
</a>
</p>
<p>
<!-- TODO: Change to link to your Github repository -->
<a href="https://github.com/usf-cs360-spring2020/template-bulma" class="button is-small" style="padding-left: 1em; padding-right: 1em;">
<i class="fab fa-github-alt"></i> <strong>Github</strong>
</a>
<a href="https://fontawesome.com/" class="button is-small" style="padding-left: 1em; padding-right: 1em;">
<i class="fab fa-font-awesome"></i> <strong>FontAwesome</strong>
</a>
<a href="https://bulma.io" class="button is-small">
<img src="https://bulma.io/images/made-with-bulma--semiblack.png" alt="Made with Bulma" width="128" height="24">
</a>
</p>
</div>
</footer>
<!-- End page footer -->
<!-- Mobile menu responsiveness -->
<!-- https://bulma.io/documentation/components/navbar/ -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
if ($navbarBurgers.length > 0) {
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
const target = el.dataset.target;
const $target = document.getElementById(target);
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});
</script>
<!-- End mobile menu responsiveness -->
</body>
</html>