This report provides insight into Detroit crime statistics from 2017 to 2024. According to Real Estate US News, Detroit is ranked number 3 as being one of the most dangerous cities to live in the United States. Detroit used to be one of the largest cities in the US and during the 1950’s was the 4th most populated city in the US. However, with the increase in automobile competition as well as use of cars has decentralized the city. Detroit has been heavily impacted by the rise and fall of the automobile industry as well as people leaving the city and moving to the suburbs. As a direct result, Detroit’s economy has suffered and there has been a rise in crime as well as an increase in the amount of vacant homes.
However, in April 2023, an initiative dubbed “One Detroit” was created in an effort to reduce crime in the neighborhoods of Detroit. The effort would take law enforcement resources into high crime areas to help reduce overall crime rates. The article written by the Detroit Free Press doesn’t give a clear answer on what specific tactics would be used but that they would be trying to prevent crime by focusing on meaningful community relationships, promote prevention and intervention programs. It also mentioned working with individuals who just left prison to help prevent them from re-committing crimes and having a supportive environment where they can take full advantage of their second chances.
This report was created to show prior crimes activity and the results from the last few years to see what specific crimes, if any, had fallen. It is also done to see what trends can be gathered from data to help Detroit Police as they continue their efforts with this “One Detroit” Initiative.
library(data.table)
library(dplyr)
library(ggplot2)
library(scales)
library(RColorBrewer)
library(ggrepel)
library(magrittr)
library(ggthemes)
library(lubridate)
library(plotly)
library(leaflet)
library(tidyverse)
This dataset was provided by City of Detroit’s open data portal on its website data.detroitmi.gov. The data was recently updated on January 25th, 2025. This report only contains reported criminal offenses reported from 2017 to 2024 in the City of Detroit. The RMS Crime Incidents dataset consists of crime reports from the Detroit Police Department Records Management System (RMS). One note about the data set is that some incidents involve the commission of multiple offenses such as domestic assault where property was also vandalized. In cases such as that there would be a row in the dataset for each offense and share a common Crime ID and Report Number. The data set contains 30 columns which includes the offense category, incident day of the week, the time and neighborhood where the incident occurred as well as current case status. It also includes time of day and year in which the crime was committed as well.
Below are some articles I read to understand more of crime activity in Detroit.
Data for the Analysis is below:
https://data.detroitmi.gov/datasets/8e532daeec1149879bd5e67fdd9c8be0_0/explore
file.name <- "U:/Detroit RMS_Crime_Incidents.csv"
Detroit.RMS_Crime_Incidents <- fread(file.name)
Crime_Year <- data.frame(count(Detroit.RMS_Crime_Incidents, incident_year))
Crime_Year <-Crime_Year[order(Crime_Year$incident_year, decreasing = TRUE), ]
ggplot(Crime_Year[2:9,], aes(x = incident_year, y = n)) +
geom_bar(colour="black", fill= "lightgreen", stat="identity") +
labs(title = "Number of Reported Crimes per Year (2017 - 2024)", x = "Year", y = "Incident Count") +
theme(plot.title = element_text(hjust = 0.5)) +
scale_y_continuous(labels = comma) +
scale_x_continuous(breaks = seq(2017, 2024, by = 1)) +
geom_text(aes(label = scales::comma(n)), vjust = -0.5, size = 4)
In chart 1 you can see the total crime incidents from 2017 to 2024. The original purpose of this research was to look into crime rates dropping from 2023 to 2024 in Detroit and this graph shows a decrease in crime incidents in 2024. However, despite the fact that total crime incidents dropped in 2024, the total amount of crime incidents in 2024 were much higher than it was prior to the pandemic.
Neighborhood_Incidents <- data.frame(count(Detroit.RMS_Crime_Incidents, neighborhood))
Neighborhood_Incidents <- replace(Neighborhood_Incidents, Neighborhood_Incidents=="", NA)
Neighborhood_Incidents <-Neighborhood_Incidents[order(Neighborhood_Incidents$n, decreasing = TRUE), ]
max_y <- plyr::round_any(max(Neighborhood_Incidents$n), 20000, ceiling)
ggplot(Neighborhood_Incidents[1:15,], aes(x = reorder(neighborhood, n, sum), y = n,)) +
geom_bar(stat = "identity", colour = "black", fill = "orange1") +
coord_flip() +
labs(title = "Top 15 Neighborhoods by Crime", x = "Neighborhood in Detroit", y = "Number of Offenses") +
theme_light() +
theme(plot.title = element_text(hjust = 0.5)) +
scale_fill_brewer(palette = "Paired") +
scale_y_continuous(labels = comma,
breaks = seq(0, max_y, by = 2500),
limits = c(0, max_y)) +
geom_text(aes(label = scales::comma(n)), hjust = -0.1, size = 3)
In chart 2, you can see the Top 15 Neighborhoods in Detroit that has the highest crime activity. One of the initiatives that “One Detroit” would want to see which neighborhoods have the highest crimes to provide the police presence to reduce crime. This will also help them as they work with individuals who were recently released from prison in getting reacclimated to society. If the individual lives in one of these neighborhoods it might help provide better resources and support during this period to reduce the likelihood of recommitting crime. It is also important for citizens who live in this area to be vigilant and aware of the high crime activity. The citizens can use this information to better protect themselves.
hours_Detroit <- data.frame(count(Detroit.RMS_Crime_Incidents, incident_hour_of_day))
x_axis_labels =min(hours_Detroit$incident_hour_of_day):max(hours_Detroit$incident_hour_of_day)
Max_Crime <- plyr::round_any(max(hours_Detroit$n), 50000, ceiling)
hi_lo <- hours_Detroit %>%
filter(n == min(n) | n == max(n)) %>%
data.frame()
ggplot(hours_Detroit, aes(x = incident_hour_of_day, y = n)) +
geom_line(color = "black", size = 1) +
geom_point(shape=21, size=4, color="red", fill = "green") +
labs(x = "Hour", y = "Crime Count", title = "Number of Reported Crimes by Hour", caption = "Source: Detroit Open Data Portel (2025)") +
scale_y_continuous(labels = comma,
breaks = seq(0, Max_Crime, by = 10000),
limits = c(0, Max_Crime)) +
theme_gray() +
theme(plot.title = element_text(hjust = 0.5)) +
scale_x_continuous(labels = x_axis_labels, breaks = x_axis_labels, minor_breaks = NULL) +
geom_point(data = hi_lo, aes(x=incident_hour_of_day, y = n), shape=21, size = 4, fill = "yellow", color = "black") +
geom_label_repel(aes(label = scales::comma(n)),
box.padding = 1,
point.padding = 1,
size = 3,
color = "Grey50",
segment.color = "darkblue")
In chart 3 shows the crime activity by hour of the day. The chart shows with the yellow circle the highest and the lowest crime activity by hour. The highest crime activity occurs at 12am and afterwards crime activity steadily decreases until it reaches its lowest mark on the graph at 6am. This makes sense as many people are sleeping and most evening businesses close between 10pm and 2am. I did find it interesting that after 6am there is a steady increase in crime activity and it peaks at 12pm (noon). Since most organizations have a lunch break around noon, I wonder if this increase in individuals being out in public settings led to the cause for the increase in crime here.
day_week <- dplyr::count(Detroit.RMS_Crime_Incidents, incident_day_of_week)
day_week <- day_week %>%
mutate(percent_of_total = 100*n/sum(n))
day_week$incident_day_of_week <-recode(day_week$incident_day_of_week,
"1" = "Monday",
"2" = "Tuesday",
"3" = "Wednesday",
"4" = "Thursday",
"5" = "Friday",
"6" = "Saturday",
"7" = "Sunday")
day_week$incident_day_of_week <- factor(day_week$incident_day_of_week, levels=c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"))
day_week = day_week[order(day_week$incident_day_of_week),]
plot_ly(day_week, labels = ~incident_day_of_week, values = ~n, sort = FALSE, type = "pie",
names = "incident_day_of_week",
textposition = "inside", textinfo = "label + percent") %>%
layout(title = "Citation Count by Day of Week (2017-2024)")
In chart 4 shows reported crimes based on the day of the week. The original thought here was to see what days of the week have the highest reported crimes and in terms of staffing the police department maybe they could increase staffing and police presence on these days compared to other days. When looking at the pie chart you will see all of the slices are around the same size with Friday and Saturday having slightly bigger slices compared to the other days. This chart confirms that activity based on day of the week is not a big factor as originally thought.
df <- Detroit.RMS_Crime_Incidents %>%
filter(incident_year > "2017" & incident_year < "2025")
Crime_Category <- data.frame(count(df, offense_category))
Crime_Category <- Crime_Category[order(Crime_Category$n, decreasing = TRUE),]
Crime_Category <- Crime_Category %>%
mutate(percent_of_total = 100*n/sum(n))
Crime_Category <- Crime_Category %>%
mutate(percent_of_total = 100*n/sum(n))
plot_ly(Crime_Category[1:10,], labels = ~offense_category, values = ~n) %>%
add_pie(hole=0.6) %>%
layout(title="Top 10 Crime by Crime Category") %>%
layout(annotations=list(text=paste0("Total Crimes Count: \n",
scales::comma(sum(Crime_Category$n))),
"showarrow"=F))
As you navigate to chart 5 you can see the Donut Chart that shows the percentages of the top 10 crimes in this dataset. You can see the top 5 crimes committed are; Assault, Larceny, and Damage to Property, Aggravated Assault, and Stolen Vehicles and make up 73.5% of all the crimes committed. This information is helpful to understand the trends in this area and what crimes are the most common in efforts to reduce these crimes in future years.
Year_Crime <- df %>%
select(offense_category, incident_year) %>%
mutate(top5_offense = ifelse(offense_category=="ASSAULT", "ASSAULT", ifelse(offense_category=="LARCENY","LARCENY",
ifelse(offense_category=="DAMAGE TO PROPERTY", "DAMAGE TO PROPERTY", ifelse(offense_category=="STOLEN VEHICLE", "STOLEN VEHICLE",
if_else(offense_category=="AGGRAVATED ASSAULT", "AGGRAVATED ASSAULT","Other")))))) %>%
group_by(top5_offense, incident_year) %>%
summarise(n=length(top5_offense), .groups="keep") %>%
group_by(incident_year) %>%
mutate(percent_of_total = round(100*n/sum(n),1)) %>%
ungroup() %>%
data.frame
Year_Crime$n <- as.numeric(Year_Crime$n)
plot_ly(hole=0.7) %>%
layout(title ="Crime Activity Top 5 Crimes (2022-2024)") %>%
add_trace(data = Year_Crime[Year_Crime$incident_year ==2024,],
labels = ~top5_offense,
values = ~Year_Crime[Year_Crime$incident_year ==2024, "n"],
sort = FALSE,
type = "pie",
textposition = "inside",
hovertemplate = "Year: 2024<br>Offense:%{label}<br>Percent:%{percent}<br>Citation Count: %{value}<extra></extra>") %>%
add_trace(data = Year_Crime[Year_Crime$incident_year ==2023,],
labels = ~top5_offense,
values = ~Year_Crime[Year_Crime$incident_year ==2023, "n"],
sort = FALSE,
type = "pie",
textposition = "inside",
hovertemplate = "Year: 2023<br>Offense:%{label}<br>Percent:%{percent}<br>Citation Count: %{value}<extra></extra>",
domain = (list(
x = c(0.16,0.84),
y = c(0.16,0.84)))) %>%
add_trace(data = Year_Crime[Year_Crime$incident_year ==2022,],
labels = ~top5_offense,
values = ~Year_Crime[Year_Crime$incident_year ==2022, "n"],
sort = FALSE,
type = "pie",
textposition = "inside",
hovertemplate = "Year: 2022<br>Offense:%{label}<br>Percent:%{percent}<br>Citation Count: %{value}<extra></extra>",
domain = (list(
x = c(0.27,0.73),
y = c(0.27,0.73))))
This nested donut chart takes a deeper look at the prior chart to focus on the top 5 crimes over the last three years to notice trend analysis. This visualization shows that there are a few crimes that have grown slightly over the last three years which is Assault at 1.1% as well as “Other Crimes” by 2.3%. Of the top 5 one is showing a slight decrease, which is “Stolen Vehicles.” This chart shows that the Assault, Larceny, Damage to Property, Aggravated Assault, and Stolen Vehicles still need to be a focus for the Detroit Police force and have steady activity over the last three years.
Repeat_Criminal <- data.frame(count(df, crime_id))
Repeat_Criminal <- Repeat_Criminal[order(Repeat_Criminal$n, decreasing = TRUE),]
Repeat_Criminal$n <- as.numeric(Repeat_Criminal$n)
ggplot(Repeat_Criminal[1:10,], aes(x = reorder(crime_id, -n), y =n)) +
geom_bar(colour="black", fill="orange", stat = "identity") +
labs(title = "Number of Crimes by Crime ID (Top 10)", x = "Case ID", y = "Number of Crimes Committed") +
theme(plot.title = element_text(hjust = 0.5)) +
geom_text(aes(label = scales::comma(n)), vjust = 2.0, size = 8)
The bar chart above shows the case id number of those individuals that committed multiple crimes in this data set. As stated in the introduction some of these crimes could have occurred in the same occurrence. For example, someone could commit assault and damage property on the same day and location. This chart could be beneficial to law enforcement in understanding which individuals have committed multiple crimes in the past and work with them to prevent repeat behavior in the future.
Location_Detroit <- select(Detroit.RMS_Crime_Incidents, latitude,
longitude, incident_year, offense_category, zip_code, neighborhood)
Location_Detroit <- Location_Detroit %>%
filter(incident_year > "2017" & incident_year < "2025")
Location_Detroit <- na.omit(Location_Detroit)
small_df <- Location_Detroit[sample(nrow(Location_Detroit), 300), ]
m <- leaflet() %>%
addTiles() %>%
addMarkers(lng = small_df$longitude, lat = small_df$latitude,
popup = paste(row.names(small_df$offense_category),
"Crime:", small_df$offense_category, "<br>Year:", small_df$incident_year,
"<br>Zip Code:", small_df$zip_code, "<br>Neighborhood:", small_df$neighborhood),
label = row.names(small_df))
m
This is an interactive map that shows you a sample of 300 crimes that were committed between 2017 and 2024 in Detroit. Since the total activity is so large, this map only records 300 locations where crimes were committed in this date range. You can see in this chart clusters of crimes committed in Downtown Detroit as well as other neighborhoods around the city. If you click on the blue markers you can see the crime committed as well as the year it was committed in along with the zip code and neighborhood.
The findings in this analysis are a detailed evaluation of the crimes that occurred from January 2017 to December 2024 in Detroit, Michigan. Detroit, as mentioned in the introduction, is ranked number 3 as being one of the most dangerous cities to live in the United States. Detroit has been heavily impacted by the fall of the automobile industry as international competition has increased and citizens moved from the inner cities to the suburbs. In this analysis it was confirmed that total crime incidents dropped from 90,369 reported crimes in 2023 to 87,700 reported crimes in 2024. During this analysis it was discovered that the top 5 crimes committed over this time period; Assault, Larceny, Damage to Property, Aggravated Assault, and Stolen Vehicles make up 73.5% of all the crimes committed in Detroit. The analysis also shows that day of the week is not a factor in the crime activity but the time of day is a larger factor with the highest crime activity occurring around 12am (midnight) and the lowest crime activity occurring at 6am. The analysis provided here is to assist police as well as the “One Detroit” initiative to better understand historical crime activity as a way to better address future crime activity in the City of Detroit. For the Police they can use the data around the results from the “Number of Reported Crimes by Hour” graph as well as “Highest Reported Crime Incidents by Detroit Neighborhood” graph to staff appropriately. This information will help provide officers ideas on where to patrol around based on times and locations based on prior data collected. For “One Detroit” it’s a way to use data analysis to address the crime activity. The program is aimed to help prevent crimes and support those individuals who were recently released from prison. The group can use this information to better prepare for those that are coming into high crime activity neighborhoods or being to work on building up Police-Citizen relationships in high crime areas.
In summary, the program “One Detroit” was launched in the spring of 2023 and while I have a year and half worth of data it is not enough of a sample size to determine the effectiveness of the program. I think it will take another two years’ worth of data to determine the effectiveness of this initiative. While early results have proven to show that reported crimes were reduced from 2023 to 2024, there is still much work to do to reduce crime in Detroit. It is also important that the citizens of Detroit are taking this information as well and taking proper precautions to protect themselves and are vigilant when being in public. It is also important for Detroit’s Police force continues to track and update these sources as we progress into the future. These data points are helpful in identifying trends and commonalities that can be used in efforts to reduce crime.