CS 560: Midterm Team Enigma

Tenderloin Emergency Calls

Data Wrangling

To better coordinate with the group theme, I picked the Tenderloin neighborhood to visualize specifically, since that neighborhood features heavily in the multineighborhood visualizations that Drew and Nick made. I used the DataSF web interface to filter on 2019 data where the call group type was FIRE and the final priority was 3 (emergency). Filtering on the FIRE call group type removed the calls for medical transport, sadly common in the Tenderloin, since I wanted to focus on the more traditional duties of the fire department.

Wrangling was carried out in both Excel and in Python. Some of the time calculations (extracting hour/min/sec and determining duration) were done in Excel first, and then I moved that processed file into Python (see FireDataParser.py) to merge repeat units and calculate updated durations..

Visualization

Data Encoding

This is a bubble chart where time of day is encoded as Y-axis position, time of year is encoded as X-axis position, call type category is encoded as color, and the total length of response time (summing up, for every unit, the time between receiving the call and that unit being available again) is encoded as the area of each bubble.

Interactivity

I implemented brushing and tooltips. When you mouse over a bubble, the selected bubble will be highlighted, and all bubbles of different call types will be faded to gray. A tooltip displaying more details about that call (date, time, units involved, etc.) will appear as well.

I also implemented a "click to send to back" functionality to ensure that viewers can still get details of smaller bubbles that are drawn in front. When a larger bubble is moused over, it will rise to the top, but clicking on it will send it to the back and bring the other smaller bubbles to the front.

Conclusions

Since Nick & Drew created more big-picture visualizations about fire department calls in San Francisco, I really wanted to supplement their contributions with a closer look at the daily realities of the SFFD's duties in one particular(ly notorious) neighborhood. Unlike their visualizations, I did not aggregate calls at all; each bubble is a single incident.

To quote my conclusions from my prototype:

Most calls are outside fires, and most of them were responded to pretty quickly. Vehicle fires similarly seem to be relatively minor (makes sense considering smaller size of vehicle). However, industrial accidents and structure fires seem to take longer, potentially over an hour, before the unit is free again. In particular this neighborhood had two larger industrial accidents in 2019, which the other neighborhoods did not.

When I wrangled the data for my visualization, I made sure to account for repeat rows and multiple units responding to the same call. Therefore, on the D3 visualization, the larger bubbles represent calls with more responding units: for example the large structure fires in February & March, the water rescues, and the industrial accidents. The smaller red "Outside Fire" calls (perhaps a trash can was on fire?) generally only required a single unit. Thanks to the additional wrangling, this difference in call length can be seen much more quickly.

An interesting observation is the apparent group of vehicle fires around June 13-14th from 10am through to around 8pm. While the summer is warmer and therefore more conducive to fire, this seems like a very concentrated spike of incidents, and I wonder if there was some sort of arsonist on the loose then?

Due to time constraints, this visualization only shows one year of one neighborhood's calls. An obvious way to expand this would be to allow a user to select a time range or a neighborhood to display. If the data is wrangled beforehand (preferably via running the same Python script repeatedly, rather than doing Excel operations on multiple files), then the filtered quantity of data points should not be too large to handle.

Inspirations

The bubble chart outline was taken from the College Mobility bubble chart example.

Interactivity was taken from the Interactivity lab.

Alternating Time Labels