Tuesday, 28 June 2011

A year of Chicago’s crime, in 30 seconds

By Drew Conway, on June 21st, 2011

Yesterday Brett Goldstein, the Chief Data Officer for the City of Chicago, announced on Twitter the release of Chicago’s crime data for the past year. The data is very detailed, and wonderful resource for criminologist and social scientists alike.

A year of Chicago's crime, in 30 seconds from Drew Conway on Vimeo.
I have been playing around with the data a bit, and have produced an animation that explores the geospatial nature of the data. Similar to what Mike Dewar did with the Afghanistan War Logs, I wanted to show variation over time rather than simple aggregates. To do so, I decided to plot moving 10-day windows of the data on a map of Chicago’s police districts. Moreover, I wanted to show the regional trends of different kinds of crime throughout Chicago.
The map below shows these 10-day windows, with the crime types color coded. The boundary lines on the map indicate police districts. Each dot represents a crime, and the opacity of each dot corresponds to the number of this type of crime reported in that geographic location on that day. For example, a dark shaded pink dot would indicate an area of heavy theft. Because there are a large number of crime types in the data I restricted this animation to only the top 18 crime types. These are those crimes for which there are over 1,000 incidents total.
This visual technique provides insight into the intensity of various crime types across region in Chicago. In addition, the timeline below the map highlights the current chronological window being plotted, as well as the total density of crimes for the entire data set. The color codes in the this timeline correspond to those on the map.
There is a lot going on here, so it is best viewed in full-screen mode…

A year of crime in Chicago, in 30 seconds from Drew Conway on Vimeo.

For me, lots of interesting observation:
  1. There actually appears to be very little variation in both the volume and location of crime. Downtown Chicago is consistently plagued by a high-degree of theft, while burglary is much more frequent in the south of Chicago. Also, the density timeline shows vary little change in the volume over time.
  2. Crimes are symbiotic. That is, it seems certain types of crimes coexists quite well; such as narcotics and prostitution. This is exemplified by he prominent north-eastern ring.
  3. People do not like to commit crimes in the cold. Conventional wisdom supports this, and Chicago appears to be no different. Though there is very little variation, there is a slight dip in the overall number of crimes from December through February.
  4. If you look closely, you can actually see the formation of roads where crimes occur. Particularly those that lead in and out of downtown.
Not being a Chicagoan, I would welcome alternative observations from those with a better understanding of the geography and crime trends.
P.S., The above animation was made entirely with open source tools: R, ggplot2, ImageMagick, and ffmpeg.
Code available here

1 comment:

  1. Drew that's a really nice visualisation, I'd be keen to temporally break it down even further to see if day/night patterns start to emerge. If you don't mind I'm going to try to use you code to do a similar visualisation for Leeds (UK).