Firstly, there’s the daily firehose view. Which works like this:
That gets you the dump of everything for October 24, 2007. It looks like this:
You end up with three top level objects:
geojson. The weather
object, predictably, contains info about the temperature that was observed on a given day. The meta object contains summary info
about the number of each type of crime reported on that day, as well as a grand total. The geojson object is a FeatureCollection
containing points for each crime reported on the given day. Within the FeatureCollection are features which contain the actual
latitude/longitude where the crime reportedly happened and more detail about the crime itself (inside the properties object).
If you’re interested in taking a look at the summarized data that was used to do this visualization, you can get that by stucturing your request this way:
This will get you a total of all arsons reported between January 1, 2001 and a week ago grouped by the high temperature of the day on which they were reported. That response should look something like this:
Each object inside the
data key gives you the total number of days that were observed at the a given
temperature and an average number of that type of crime that was reported on days that were observed at that temperature.
The valid categories of crime that can be fetched this way are:
So, just swapping out
arson.json for any one of those categories “.json” will get you what your after.
The other key that will work is
total which will give you the averages for the number of all crimes reported on
days at a given temperature.
So, you’re old school, eh? Well, I think I got you at least partially covered. There are CSV dumps available by year for for the reported crimes vs. temperature data. However, instead of being grouped by temperature, there is a row for each day that gives you the date, the observed temperature, the total number of crimes reported that day, and then a category by category count. You can get those like this:
That will get you a CSV dump containing all the info for 2010. There is also a full dump that can be fetched by swapping out
full_dump.csv in the example above.
Thanks to some generous help with infrastructure from the Smart Chicago Collaborative I’m working on getting a REST endpoint together for the bulk of the crime and weather data (and whatever else I end up with). So, watch this space.