Is Chicago Still Chiraq?
In this take-home lab exercise, you’ll update the previous analysis conducted on Chicago’s homicide rate to determine if things are improving or getting worse, as well as provide the best possible estimate for the leadership as to what is likely to happen next.
Part 1: Data Acquisition and Cleaning
1.1 Go to Chicago’s data portal and download Chicago’s Homicide data for the period 1 January 2010 until30 November2021. The data portal is available at this web address:
https://data.cityofchicago.org/Public-Safety/Crimes-2001-to-present/ijzp-q8t2
1.2 Once there, open the “Crimes - 2001 to present - Dashboard.”
1.3 Use the “Date”" box (click and drag) and the “Primary Type” box (click on appropriate column) to subset the data to all homicides from 1 January 2010 until 30 November 2021. You have to modify the cvs file to adjust it.
1.4 Use the Export button at the top to export your filtered query.
1.5 Import the data as a .csv into your analysis environment (RStudio).
Part 2: Trend Analysis
Use the techniques/code you learned for seasonal decomposition and trend analysis in this week’s in-class lab to analyze the data you have downloaded. Note - it is imperative to prevent errors in your analysis that you completely clear the memory and variables stored in your analytical environment prior to beginning this new analysis. Use the following code to reset R’s memory:
Question 1: Provide the following in your written lab report:
Produce a graphic/visualization suitable for briefing a decision-maker that illustrates the observed data and your fitted trend (and anything else you think would be helpful).
Answer the following questions: Is the overall homicide rate getting better or worse in Chicago right now (i.e.what is the trend over the last couple of months)? Support your assertions using your analysis (a good visualization helps here).
Part 3: Forecasting
Use the techniques/code you learned for time series forecasting in this week’s in-class lab to analyze the data you have downloaded in order to develop a forecast for the rest of the year.
Question 2: Provide the following in your written lab report:
Compare the short-term forecasting performance of all of the forecasting techniques you studied (you can use the seasonal Naive model as the Naive model). Which of these techniques is best for this use case?
Provide a graphic/visualization illustrating your forecast (and your uncertainty in the forecast) for the next 12 months.
Provide a short written summary appropriate for leaders in government about what you expect to happen over the next year, especially during the summer months when crime peaks. Do you expect things to be better or worse this summer than last summer?