Category Archives: Ruby

The chart below displays over 15 years of CPD’s Cannabis related arrests for possession of 30 grams or less. The data is from data.cityofchicago.org

Here is the ruby code written to accumulate the monthly totals. Additional data filtering was done on the Socrata website prior to exporting the csv data file. Google Charts was used to create the line chart. CartoDB was used to create the still of the torque map.

In this post I look into Chicago Police Department’s enforcement of two particular narcotics report types: Heroin and Crack Cocaine. I was curious to see yearly migrations of CPD’s activity from 2003 to 2014 in the west side region of Chicago.

In this post, I will give a semi-detailed overview of how to make an animated heat map over a time range. This is my first attempt at making an animated heat map.

I will be revisiting Chicago crime statistics from City of Chicago Data Portal 2001-2013

This dataset reflects reported incidents of crime (with the exception of murders where data exists for each victim) that occurred in the City of Chicago from 2001 to present, minus the most recent seven days.Data is extracted from the Chicago Police Department’s CLEAR (Citizen Law Enforcement Analysis and Reporting) system. Read More about the dataset here

On 11/28/2013 I downloaded a csv from chicago’s data portal named Crimes_-_2001_to_present.csv, its size was 1,050,688 KB

Here is an example of how I would parse out all coordinates of narcotics violations for the month of January in 2013.

Okay, now I’m going to manually make one of these images (with static center and size) for each month from January 2012 to October 2013. Next, I wrote a quick c# application using ImageMagick to programmatically crop each Browser screenshot.