17 min read

Reporting on Seattle Police calls using interactive Plotly charts

Seattle!

City of Seattle: Reporting on personal crisis calls to police

1. Percentage of use-of-force (UF) and veteran-involved (Vet) calls

2. Percentage of suicidal person (SP) and behavoural crisis (BC) calls

3. Calls for person in crisis by day and hour

4. Disposition of person-in-crisis calls

This began while working through the week-long Dashboarding with Scheduled Notebooks class taught by Rachael Tatman at Kaggle.com. The biggest benefit was getting a chance to work with R’s Plotly package. Plotly, the Montreal-based company that offers interactive visualization and dashboarding tools, is one we used a lot at the National Post to embed into stories.

A VERY small sample:

Russia Winter Olympic medals: earned and stripped

NHL hat-trick rates

NFL Thanksgiving Day games played

There were a few things that were mildly frustrating working on the Plotly web platform itself, but I highly recommend it for its general ease of use and performance. It’s great to be able to bring that interactive functionality into making vizualizations with R code.

Although the focus of the class was scheduling scripts to update the data on a regular basis, this page is not being updated for now. I’ll have to address the code for the top two charts once the calendar flips to 2019.

I was using a larger palette of colours for some early vizualizations, which I collected from the Mariners and Seahawks palettes at the Team Color Codes website, but I ended up using a Seahawks green, a Mariners blue and a Supersonics yellow.

After creating some very basic visualizations of the data to start, I noticed that the Seattle police fielded a large number of calls that it had coded as involving a “suicidal person” or a someone in “behavioral/emotional crisis.” Working from the point of view of creating a dashboard for a mental health agency, I focused on those calls as a percentage of the total call volume.

The City of Seattle has its own dashboard on this crisis call data, which gave me the idea to make the heatmap of the days and hours when these particular personal crisis calls were most likely to come in. It might not occur to the layperson that the noon hour is one of the more likely times.


Data: Kaggle: Seattle Crisis Data

Code: at Github

Photo: Amanda Grove via Pexels