A year of Chicago’s crime, in 30 seconds
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:
- 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.
- 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.
- 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.
- 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.
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.