Crime Rhythm Maps

A Rhythm map is a heat map with two time dimensions, which makes it much easier to find temporal patterns in some kinds of data. This example will use crime incidents from San Diego county, from 2007 to 2013..

Plotting the number of incidents for burglary versus the hour of the day, for instance, results in this dull chart:

There are a few interesting patterns here, primarily the minimum at about 5:00AM. But nearly all categories of crime have a lull at 5:00 in the morning, which isn’t very surprising. Part of the reason that the chart isn’t very useful is that there are several types of burglary, and they happen at different times of the week and different times of the day, a distinction which isn’t visible in a line plot. So, let’s look at burglary by hour of day and day of week.

Here we can see three patterns:

  • A strong line at noon. This is an artifact of data collection; reports without a time probably default to noon.
  • A cluster in the mornings and afternoons of weekdays. These are residential burglaries.
  • A strong line in the early evening on Fridays; These are commercial burglaries.

Here are the residential and commercial burglaries broken out.

There are many different patterns like these for the different crime categories.

There are also different patterns for a single crime type for different communities. Alcohol violations in Downtown are very late on weekends, and much earlier on weekdays, while in Pacific Beach, the violations are more concentrated earlier on weekends, and UCSD students only get rowdy on Friday.

Here is another interesting pattern in alcohol violations, when plotted by hour of day versus week of year: they are more common in the summers and more common after 3:00PM, except for week 27 — the typical week of July 4 — when the violations are spread through the entire day.

There are many other patterns to be found in crime dataset by looking at other combinations of time units, community, and crime type. If you’d like to explore some of these patterns, you can clone, run and extend this notebook from github.

freqamp
period
23.9989050.0416690.346067
20.9990420.0476210.158237
11.9994530.0833370.153824
27.9987230.0357160.137281
167.9923370.0059530.129606
7.9996350.1250060.106893
12.9224870.0773840.095370
18.6658150.0535740.083372
11.1994890.0892900.082961
83.9961690.0119050.064842
33.5984670.0297630.064258
5.9997260.1666740.062298
8.3996170.1190530.053870
4.7997810.2083430.052602
7.6360150.1309580.050812