In 2016, there was preliminary evidence that showed that the number of murders for 2016 rose by over 10 percent by October of that year. It rose by 10.8 percent prior to that year, which was a large increase. This data was collected prior to the FBI releasing the official data and came from multiple sources for large cities where the population is greater that 250,000. It is important to note that the murders for the year of 2016 do not account for the entire year. The link to the article can be found here.
URL <- "https://raw.githubusercontent.com/fivethirtyeight/data/master/murder_2016/murder_2016_prelim.csv"
murders <- read.csv(URL)
## preview of variables
str(murders)
## 'data.frame': 79 obs. of 7 variables:
## $ city : chr "Chicago" "Orlando" "Memphis" "Phoenix" ...
## $ state : chr "Illinois" "Florida" "Tennessee" "Arizona" ...
## $ X2015_murders: int 378 19 114 72 90 78 52 95 191 17 ...
## $ X2016_murders: int 536 73 158 111 125 111 79 118 212 34 ...
## $ change : int 158 54 44 39 35 33 27 23 21 17 ...
## $ source : chr "https://portal.chicagopolice.org/portal/page/portal/ClearPath/News/Crime%20Statistics" "OPD " "MPD" "PPD " ...
## $ as_of : chr "10/2/2016" "9/22/2016" "9/11/2016" "8/31/2016" ...
## removing variables
murders <- subset(murders, select = -c(source, as_of))
## renaming variables
murders <- rename(murders,c("murders2015" = "X2015_murders", "murders2016" = "X2016_murders"))
## changing the change variable to reflect a percent in change
murders$change <- ifelse(murders$murders2015 == 0, round(murders$change * 100, 2),
round(murders$change / murders$murders2015 * 100, 2))
## Top 10 cities with the largest change in percent
head(murders[order(-murders$change), ], 10)
## city state murders2015 murders2016 change
## 21 Lincoln Nebraska 0 9 900.00
## 15 Arlington Texas 4 17 325.00
## 2 Orlando Florida 19 73 284.21
## 43 Henderson Nevada 1 3 200.00
## 36 Plano Texas 2 5 150.00
## 13 Austin Texas 13 28 115.38
## 10 Fort Wayne Indiana 17 34 100.00
## 19 Santa Ana California 10 20 100.00
## 26 Mobile Alabama 6 12 100.00
## 38 Toledo Ohio 5 8 60.00
## Top 10 cities with the largest amount of murders
head(murders[order(-murders$murders2016), ], 10)
## city state murders2015 murders2016 change
## 1 Chicago Illinois 378 536 41.80
## 75 New York New York 266 252 -5.26
## 78 Baltimore Maryland 249 230 -7.63
## 29 Detroit Michigan 216 221 2.31
## 31 Philadelphia Pennsylvania 209 213 1.91
## 9 Houston Texas 191 212 10.99
## 63 Los Angeles California 209 205 -1.91
## 3 Memphis Tennessee 114 158 38.60
## 58 St. Louis Missouri 136 133 -2.21
## 55 New Orleans Louisiana 130 127 -2.31
(sum(murders$murders2016) - sum(murders$murders2015)) / sum(murders$murders2015) * 100
## [1] 10.4685
## Subsetting further to view where more murders than 50 murders occured
mdf <- subset(murders, murders2016 >= 50)
## Top 10 cities with the largest change in percent in mdf
head(mdf[order(-mdf$change), ], 10)
## city state murders2015 murders2016 change
## 2 Orlando Florida 19 73 284.21
## 4 Phoenix Arizona 72 111 54.17
## 7 Louisville Kentucky 52 79 51.92
## 6 San Antonio Texas 78 111 42.31
## 1 Chicago Illinois 378 536 41.80
## 5 Las Vegas Nevada 90 125 38.89
## 3 Memphis Tennessee 114 158 38.60
## 11 Atlanta Georgia 68 85 25.00
## 8 Dallas Texas 95 118 24.21
## 20 Tulsa Oklahoma 43 52 20.93
(sum(mdf$murders2016) - sum(mdf$murders2015)) / sum(mdf$murders2015) * 100
## [1] 11.763
One recommendation would be to recollect the data in order to reflect the number of murders that happened in total for the year of 2016. There are some cities that more than doubled their murder rates, however, it can be beneficial to look at how the cities with the larger amounts of murders contributed to the yearly murder statistic. Overall, the data does seem to contribute to the author’s claim that amount of murders increase by over ten percent. It is also interesting to see that the cities that had more murders, contributed to the increased rate.