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...

1 answer below »

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:



  1. 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).




  2. 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:



  1. 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?




  2. Provide a graphic/visualization illustrating your forecast (and your uncertainty in the forecast) for the next 12 months.




  3. 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?



Answered 3 days AfterJan 28, 2022

Answer To: Is Chicago Still Chiraq? In this take-home lab exercise, you’ll update the previous analysis...

Mohd answered on Jan 31 2022
135 Votes
-
-
-
1/31/2022
#install.packages("rCharts")
library(readr)
library(magrittr)
library(dplyr)
library(ggplot2)
library(rmarkdown)
library(forecast)
library(plyr)
library(xtable)
library(base64enc)
library(knitr)
library(data.table)
library(Rcpp)
library(readr)
crimes2001topresent <- read_csv("data/Project/crimes2001to
present.csv")
View(crimes2001topresent)
summary(crimes2001topresent)
## ID Case Number Date Block
## Min. : 19237 Length:6118 Length:6118 Length:6118
## 1st Qu.: 20918 Class :character Class :character Class :character
## Median : 22608 Mode :character Mode :character Mode :character
## Mean : 111191
## 3rd Qu.: 24194
## Max. :12213097
## IUCR Primary Type Description Location Description
## Length:6118 Length:6118 Length:6118 Length:6118
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## Arrest Domestic Beat District
## Mode :logical Mode :logical Length:6118 Length:6118
## FALSE:3654 FALSE:5725 Class :character Class :character
## TRUE :2464 TRUE :393 Mode :character Mode :character
##
##
##
## Ward Community Area FBI Code X Coordinate
## Min. : 1.00 Min. : 1.0 Length:6118 Min. :1116633
## 1st Qu.: 9.00 1st Qu.:26.0 Class :character 1st Qu.:1152184
## Median :20.00 Median :43.0 Mode :character Median :1166028
## Mean :20.01 Mean :43.2 Mean :1165187
## 3rd Qu.:28.00 3rd Qu.:63.0 3rd Qu.:1177364
## Max. :50.00 Max. :77.0 Max. :1204706
## Y Coordinate Year Updated On Latitude
## Min. :1815115 Min. :2010 Length:6118 Min. :41.65
## 1st Qu.:1854745 1st Qu.:2013 Class :character 1st Qu.:41.76
## Median :1869995 Median :2016 Mode :character Median :41.80
## Mean :1876075 Mean :2016 Mean :41.82
## 3rd Qu.:1899458 3rd Qu.:2018 3rd Qu.:41.88
## Max. :1951492 Max. :2020 Max. :42.02
## Longitude Location
## Min. :-87.85 Length:6118
## 1st Qu.:-87.72 Class :character
## Median :-87.67 Mode :character
## Mean :-87.67
## 3rd Qu.:-87.63
## Max. ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here