D3 Implementation

Count of Various Emergencies by year: 2010-2019.

Count of Various Emergencies by Year: 2010-2019


by Ian Granger, Mar 20, 2020

The goal of this implementation was to show the the increase in particular types of emergencies over time. In creating this implementation, I faced several hurdles in reducing the amount of data necessary to construct this graph. As a result, my final implementation is visually differnt than the prototype that I set out to reproduce. However, it does encode the same basic information, with the daily count for different emergencies on the y-axis, and the date on the x-axis. While the final product is different than the initial prototype, you can clearly see that the category for medical emergencies has grown steadily over the past decade, where as the others have remained relatively consistent. This would indicate that the SFFD should expect to handle more medical emergencies in the future.

Data Encoding

To create this implementation, I first created a python script that would filter out irrelevant columns from the data, to cut down on the raw size of the file. This greatly increased performance and as a result the file was ~600KB. From there, I used Call Type to create seven custom groups, which are "Various Other", "Rescue", "Misc Emergency", "Medical", "Fire", "Chemical / Electrical", "Aid Other Agency". While the data set did provide it's own groupings, I felt that it was not quite detailed enough to gain insight. If I was to expand this visualization in a real life scenario, my main change would probably be to consult someone in the SFFD to verify that these groupings are representative, however from a lay mans perspective they seem fairly logical.

Interactivity

Because of difficulties I faced elsewhere, I was unable to fully implement interactivity into this graph. From the prototype, my goal for interactivity was to implement some details on demand, to give exact counts and a ratio for each custom group. This ratio would give an idea of which groups were increasing over time. However, even though I was unable to fully implement this interactivity, the same general information can be gleaned by looking at the visualization itself.


D3 implementation