Section 1 - Loading the Data
1.1
How many rows of data (observations) are in this dataset?
191641
1.2
How many variables are in this dataset?
11
1.3
Using the “max” function, what is the maximum value of the variable “ID”?
18134
1.4
What is the minimum value of the variable “Beat”?
4756
1.5
How many observations have value TRUE in the Arrest variable (this is the number of crimes for which an arrest was made)?
15536
1.6
How many observations have a LocationDescription value of ALLEY?
2308
Section 2 - Understanding Dates in R
In many datasets, like this one, you have a date field. Unfortunately, R does not automatically recognize entries that look like dates. We need to use a function in R to extract the date and time. Take a look at the first entry of Date (remember to use square brackets when looking at a certain entry of a variable).
2.1
In what format are the entries in the variable Date?
- Month/Day/Year Hour:Minute
- Day/Month/Year Hour:Minute
- Hour:Minute Month/Day/Year
- Hour:Minute Day/Month/Year
Month/Day/Year Hour:Minute
2.2
Now, let’s convert these characters into a Date object in R. In your R console, type
DateConvert = as.Date(strptime(mvt$Date, "%m/%d/%y %H:%M"))
This converts the variable “Date” into a Date object in R. Take a look at the variable DateConvert using the summary function.
What is the month and year of the median date in our dataset? Enter your answer as “Month Year”, without the quotes. (Ex: if the answer was 2008-03-28, you would give the answer “March 2008”, without the quotes.)
May 2006
2.3
Now, let’s extract the month and the day of the week, and add these variables to our data frame mvt. We can do this with two simple functions. Type the following commands in R:
mvt$Month = months(DateConvert)
mvt$Weekday = weekdays(DateConvert)
This creates two new variables in our data frame, Month and Weekday, and sets them equal to the month and weekday values that we can extract from the Date object. Lastly, replace the old Date variable with DateConvert by typing:
mvt$Date = DateConvert
Using the table command, answer the following questions.
In which month did the fewest motor vehicle thefts occur?
February, 13511
2.4
On which weekday did the most motor vehicle thefts occur?
Friday, 29284
2.5
Each observation in the dataset represents a motor vehicle theft, and the Arrest variable indicates whether an arrest was later made for this theft. Which month has the largest number of motor vehicle thefts for which an arrest was made?
January, 1435
Section 3 - Visualizing Crime Trends
3.1
Now, let’s make some plots to help us better understand how crime has changed over time in Chicago. Throughout this problem, and in general, you can save your plot to a file. For more information, this website very clearly explains the process.
First, let’s make a histogram of the variable Date. We’ll add an extra argument, to specify the number of bars we want in our histogram. In your R console, type
hist(mvt$Date, breaks=100)
Looking at the histogram, answer the following questions.
In general, does it look like crime increases or decreases from 2002 - 2012?
Decreases
In general, does it look like crime increases or decreases from 2005 - 2008?
Decreases
In general, does it look like crime increases or decreases from 2009 - 2011?
Increases
3.2
Now, let’s see how arrests have changed over time. Create a boxplot of the variable “Date”, sorted by the variable “Arrest” (if you are not familiar with boxplots and would like to learn more, check out this tutorial). In a boxplot, the bold horizontal line is the median value of the data, the box shows the range of values between the first quartile and third quartile, and the whiskers (the dotted lines extending outside the box) show the minimum and maximum values, excluding any outliers (which are plotted as circles). Outliers are defined by first computing the difference between the first and third quartile values, or the height of the box. This number is called the Inter-Quartile Range (IQR). Any point that is greater than the third quartile plus the IQR or less than the first quartile minus the IQR is considered an outlier.
Does it look like there were more crimes for which arrests were made in the first half of the time period or the second half of the time period? (Note that the time period is from 2001 to 2012, so the middle of the time period is the beginning of 2007.)
Second half
3.3
Let’s investigate this further. Use the table function for the next few questions.
For what proportion of motor vehicle thefts in 2001 was an arrest made?
Note: in this question and many others in the course, we are asking for an answer as a proportion. Therefore, your answer should take a value between 0 and 1.
0.1041173
3.4
For what proportion of motor vehicle thefts in 2007 was an arrest made?
0.08487395
3.5
For what proportion of motor vehicle thefts in 2012 was an arrest made?
0.03902924
Since there may still be open investigations for recent crimes, this could explain the trend we are seeing in the data. There could also be other factors at play, and this trend should be investigated further. However, since we don’t know when the arrests were actually made, our detective work in this area has reached a dead end.
Section 4 - Popular Locations
4.1
Analyzing this data could be useful to the Chicago Police Department when deciding where to allocate resources. If they want to increase the number of arrests that are made for motor vehicle thefts, where should they focus their efforts?
We want to find the top five locations where motor vehicle thefts occur. If you create a table of the LocationDescription variable, it is unfortunately very hard to read since there are 78 different locations in the data set. By using the sort function, we can view this same table, but sorted by the number of observations in each category. In your R console, type:
sort(table(mvt$LocationDescription))
Which locations are the top five locations for motor vehicle thefts, excluding the “Other” category? You should select 5 of the following options.
- Bank
- Gas Station
- Hotel/Motel
- Street
- Car Wash
- Restaurant
- Parking Lot/Garage (Non-Residential)
- Alley
- Driveway (Residential)
- Vacant Lot/Land
1-Street/ 156564
2-Parking Lot/Garage (Non-Residential)/ 14852
4-Alley/ 2308
5-Gas Station/ 2111
6-Driveway (Residential)/ 1675
4.2
Create a subset of your data, only taking observations for which the theft happened in one of these five locations, and call this new data set “Top5”. To do this, you can use the | symbol. In lecture, we used the & symbol to use two criteria to make a subset of the data. To only take observations that have a certain value in one variable or the other, the | character can be used in place of the & symbol. This is also called a logical “or” operation.
Alternately, you could create five different subsets, and then merge them together into one data frame using rbind.
How many observations are in Top5?
???
4.3
R will remember the other categories of the LocationDescription variable from the original dataset, so running table(Top5$LocationDescription) will have a lot of unnecessary output. To make our tables a bit nicer to read, we can refresh this factor variable. In your R console, type:
Top5$LocationDescription = factor(Top5$LocationDescription)
If you run the str or table function on Top5 now, you should see that LocationDescription now only has 5 values, as we expect.
Use the Top5 data frame to answer the remaining questions.
One of the locations has a much higher arrest rate than the other locations. Which is it? Please enter the text in exactly the same way as how it looks in the answer options for Problem 4.1.
???
4.4
On which day of the week do the most motor vehicle thefts at gas stations happen? (Monday~Sunday)
???
4.5
On which day of the week do the fewest motor vehicle thefts in residential driveways happen?(Monday~Sunday)
???
LS0tCnRpdGxlOiAiQVMxLTEgQW4gQW5hbHl0aWNhbCBEZXRlY3RpdmUiCmF1dGhvcjogIjxLYXJlbiBZYW5nPiA8TTA2NDYxMDAyMT4iCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCi0gLSAtIAoKIyMjIFNlY3Rpb24gMSAtIExvYWRpbmcgdGhlIERhdGEKCiMjIyMgMS4xIApIb3cgbWFueSByb3dzIG9mIGRhdGEgKG9ic2VydmF0aW9ucykgYXJlIGluIHRoaXMgZGF0YXNldD8KCmBgYHtyfQoxOTE2NDEKYGBgCgoKIyMjIyAxLjIgCkhvdyBtYW55IHZhcmlhYmxlcyBhcmUgaW4gdGhpcyBkYX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