Chicago Crime — A High Level Data Analysis
By: Jannis Lambinus
Tags: Chicago, Crime, Data Science, Data Analysis

Unsurprisingly, the crime in Chicago is not equally distributed. Some areas experience more crimes than others. Theft is highest in an area on the north eastern part of the city, while battery got its highest in the north west and among some community areas in the central / southern part. The high values for criminal damage correlate relatively well with those for battery.

Overall, we see that the most northern and southern areas of Chicago got the least amount of crimes, together with those community areas in the east and west.

Question 4:

Can we reliably predict arrests?

The criminals of Chicago face a strong opponent, the Chicago Police Department (CPD). With every crime happening, the search for potential suspects begins. And in case of a success, it results in making an arrest.

The questions is, whether it is possible to predict if an arrest for a particular crime will most likely be made, or not, with a sufficiently high probability. For that reason I’ve taken a subset of the dataset used to answer the previous questions. In particular, I have only used crimes for which over the time span from 2003 to 2020 at least 100,000 cases have been recorded.

The overall accuracy of a simple model, using logistic regression, to predict the arrest outcome got a value of 87%. At first glance this seems decent. However, considering that the initial dataset got an arrest rate of 26.8%, one could predict “no arrest” for all records and be correct in 73.2%. So the model improves the prediction rate by about 15 percentage points.

Figure 4: Confusion matrix showing predicted vs. true label for arrests made

Above you can see a confusion matrix showing all predictions of the model.

Even though the overall accuracy is not too bad, we can see that about half of the crimes for which an arrest has been made, our model predicted “no arrest” (false negative). So we are not much better than throwing a fair coin. This is also reflected in the recall score for True values in the table below with a value of 0.51.

The number of crimes where no arrest was made, but our model predicted one to be made (false positive), is relatively small with about 16,000 wrongly labeled crimes.

Figure 5: Classification scores

In summary we can say that the model is not reliably suitable to predict if an arrest is made for a given crime, especially if an arrest will eventually be made, as we predict wrong within about half the cases.

Note, however, that the scope for this analysis was narrow and no sophisticated machine learning process has been performed. The feature engineering was rudimentary and other available data which could be combined with the used dataset could potentially result in way better predictions.

Conclusion

In this article we have had a high level look on crime data of the City of Chicago, Illinois. In particular we observed that:

The total number of crimes has mostly been decreasing since 2003. There are more crimes happening in the summer compared to the winter and more during day time compared to night time. The weekday has no significant effect. Theft, battery and criminal damage are the three most common crime types in Chicago. Offenses in regards to narcotics are less wide spread across the city but have some focus areas in the west and central part of the city. The community areas with high levels of battery and criminal damage have a large overlap, with their highest values in the north west of the city. Theft is most common in a few community areas in the north east. Predicting arrests is difficult as many different factors play a role. A prediction model simply based on the crime type, community area and date showed to be not reliable enough. However, more sophisticated projects might be able to build a reliable prediction model in combination with more data available from the City of Chicago.

A lot more and deeper analysis is possible with the used dataset, especially if combined with more data publicly available at https://data.cityofchicago.org/.

What interesting observations do you think can be extracted from it? Write it into the comments below!

If you are interested in more details about this data analysis you can have a look at the associated GitHub repository here.