#Plot 1: Fatal Encounters by Year
fatal %>%
filter(!is.na(year)) %>%
group_by(year) %>%
summarize(total = n()) %>%
ggplot(aes(x = year, y = total)) +
geom_line(color = "darkred", size = 1.2) +
geom_point(color = "red") +
labs(
title = "Plot 1. Fatal Encounters by Year (U.S.)",
x = "Year",
y = "Number of Fatal Encounters"
) +
theme_bw()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Takeaway from Plot 1: Fatal Encounters by Year (U.S.) The number of reported fatal encounters rose sharply after 2000 and has remained high since 2014. This may reflect both greater public awareness and improved data collection rather than a true decline or increase in real events.
#Plot 2: Fatal Encounters by Race/Ethnicity
fatal %>%
filter(!is.na(race)) %>%
group_by(race) %>%
summarize(total = n()) %>%
arrange(desc(total)) %>%
ggplot(aes(x = reorder(race, total), y = total, fill = race)) +
geom_col() +
coord_flip() +
labs(
title = "Plot 2. Fatal Encounters by Race/Ethnicity",
x = "Race/Ethnicity",
y = "Total Fatalities"
) +
theme_bw() +
theme(legend.position = "none")
Takeaway from Plot 2: Fatal Encounters by Race/Ethnicity Most recorded victims are identified as White or Black, but Black individuals appear disproportionately represented compared to their share of the population. This points to continuing racial disparities in the use of deadly force.
#Plot 3: Interactive Geographic Map of Fatal Encounters
leaflet(fatal_geo) %>%
addProviderTiles(providers$CartoDB.DarkMatter) %>%
addCircles(
radius = 300,
color = "red",
fillOpacity = 0.4,
weight = 1,
popup = ~paste0(
"<b>Name:</b> ", name, "<br>",
"<b>City:</b> ", city, ", ", state, "<br>",
"<b>Race:</b> ", race, "<br>",
"<b>Gender:</b> ", gender
)
) %>%
addControl(htmltools::HTML("<b>Map 1.</b> Fatal Encounters Across the U.S."), position = "topleft")
Takeaway from Plot 3 (Map 1): Fatal Encounters Across the U.S. Incidents are spread across the entire country, with dense clusters in large urban areas such as Los Angeles, Houston, and Atlanta. These cities have both large populations and high reporting rates, which likely explain their higher counts.
#Plot 4: Age Distribution by Gender
fatal %>%
filter(!is.na(age), !is.na(gender)) %>%
ggplot(aes(x = gender, y = age, fill = gender)) +
geom_boxplot() +
labs(
title = "Plot 4. Age Distribution of Victims by Gender",
x = "Gender",
y = "Age at Time of Death"
) +
theme_bw() +
theme(legend.position = "none")
Takeaway from Plot 4: Age Distribution of Victims by Gender Most victims are men between 20 and 40 years old, while women and transgender individuals make up a small share of the total. The age range suggests that young to middle-aged adults are at the greatest risk in fatal encounters.
#Plot 5: Age Distribution by Race/Ethnicity
fatal %>%
filter(!is.na(age), !is.na(race)) %>%
mutate(race = fct_lump(factor(race), n = 6)) %>% # keep top 6 racial groups
ggplot(aes(x = race, y = age, fill = race)) +
geom_boxplot(outlier.alpha = 0.3) +
coord_flip() +
labs(
title = "Plot 5. Age Distribution by Race/Ethnicity",
x = "Race/Ethnicity",
y = "Age at Time of Death"
) +
theme_bw() +
theme(legend.position = "none")
>Takeaway from Plot 5: Most victims are young adults, mainly in their
20s and 30s. When comparing different races, Black and Hispanic victims
are usually younger than White victims. This shows that younger people
of color are more affected in fatal police encounters than other
groups.
Final Narrative: The Fatal Encounters dataset helps show what kinds of people have died during interactions with police officers in the United States. By looking at patterns across time, race, place, age, and gender, we can see how this issue affects different groups in different ways. Over time, the number of deaths has gone up, especially after 2014. This rise may be due to more public attention, more reporting, or simply that these incidents are still happening often. Even with better awareness, the total number of deaths has stayed high, which means that this problem has not gone away. When looking at race, the data shows that most victims are White or Black, but Black victims make up a larger share compared to their population size. This shows that policing outcomes are not equal and that Black communities continue to face a higher risk in these fatal encounters. The map shows that these incidents are spread all across the country but are especially common in big cities like Los Angeles, Houston, and Atlanta, where there are more people and more frequent interactions between police and civilians. When looking at gender and age, the data shows that most people killed are men between 20 and 40 years old, with far fewer women and transgender victims. This means that young men are at the highest risk overall. The last plot, which looks at both age and race, shows that Black and Hispanic victims are often younger than White victims. Taken together, these five plots tell a story of a continuing national issue that affects people across all regions but hits some communities harder than others. It shows that race, age, and gender all play important roles in who is most at risk in fatal police encounters.