A year of Chicago’s crime, in 30 seconds

[This article was first published on Zero Intelligence Agents » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.

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

To leave a comment for the author, please follow the link and comment on their blog: Zero Intelligence Agents » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)