Introduction:

This project delves into the Fatal Encounters dataset, initiated by Brian Burghart in 2020, which compiles data on police killings of civilians across the United States. The comprehensive database includes information on individuals’ names, gender, race, location, and the disposition of their cases. The assignment aims to uncover compelling narratives hidden within this data, highlighting specific aspects of police killings that warrant attention.

Importying libraries:

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.3     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.3     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggplot2)
library(dplyr)
library(knitr)
library(tmap)
## Breaking News: tmap 3.x is retiring. Please test v4, e.g. with
## remotes::install_github('r-tmap/tmap')
library(tmaptools)
library(RColorBrewer)

Importing csv file:

fe <- read.csv("fatal_encounters_database.csv")

Figure 1: Bar Chart of Fatal Encounters by Gender

fe$Gender[fe$Gender == ""] <- "Unspecified" # Replacing missing values with "Unspecified"

gender_count <- fe %>%
  group_by(Gender) %>%
  summarise(count = n())

custom_colors <- c("#914E62","#BA456A", "#D12656","#E82559")

ggplot(gender_count, aes(x = Gender, y = count, fill = Gender)) +
  geom_bar(stat = "identity") +
  labs(title = "Fatal Encounters by Gender", x = "Gender", y = "Count") +
  scale_fill_manual(values = custom_colors) + 
  theme_minimal(base_size = 15)

Figure 2: Cause of Death

cause_of_death <- fe %>%
  filter(!is.na(Highest.level.of.force)) %>%
  group_by(Highest.level.of.force) %>%
  summarise(count = n()) %>%
  arrange(desc(count))

ggplot(cause_of_death, aes(x = reorder(Highest.level.of.force, -count), y = count)) +
  geom_bar(stat = "identity", fill = "indianred") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  labs(title = "Fatal Encounters by Cause of Death", x = "Cause of Death", y = "Count")

Figure 3: Age of Decendents

fe$Age <- as.numeric(fe$Age)
## Warning: NAs introduced by coercion
age_data <- fe %>%
  filter(!is.na(Age)) %>%
  mutate(Age_Group = cut(Age, 
                         breaks = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100), 
                         labels = c("0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"),
                         right = TRUE)) %>%
  group_by(Age_Group) %>%
  summarise(count = n()) %>%
  filter(!is.na(Age_Group))

ggplot(age_data, aes(x = Age_Group, y = count)) +
  geom_bar(stat = "identity", fill = "indianred2") +
  geom_text(aes(label = scales::comma(count)), vjust = -0.3, size = 3) + 
  scale_y_continuous(labels = scales::comma_format(), limits = c(0, 10000), breaks = seq(0, 10000, 2000)) + 
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1), 
        plot.title = element_text(face = "bold", size = 16), 
        axis.title.x = element_text(size = 12),
        axis.title.y = element_text(size = 12)) +
  labs(title = "Age of Decedent", 
       x = "Decedent's Age", 
       y = "Number of Deaths")

Figure 4: Deaths Per State

state_data <- fe %>%
  filter(!is.na(State)) %>%
  group_by(State) %>%
  summarise(count = n()) %>%
  arrange(desc(count))

ggplot(state_data, aes(x = reorder(State, -count), y = count)) +
  geom_bar(stat = "identity", fill = "indianred3", width = 0.7) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  labs(title = "Deaths by State", x = "State", y = "Count")

Figure 5: Deaths by Year

fe$Year <- as.numeric(format(as.Date(fe$`Date.of.injury.resulting.in.death..month.day.year.`, format="%m/%d/%Y"), "%Y"))  #extracting the year from the 'Date of injury resulting in death (month/day/year)' column

deaths_per_year <- fe %>%
  filter(!is.na(Year)) %>%
  group_by(Year) %>%
  summarise(Deaths = n())

ggplot(deaths_per_year, aes(x = Year, y = Deaths)) +
  geom_area(fill = "indianred4", alpha = 0.6) +
  labs(title = "Deaths by Year", x = "Year of Date of Injury Resulting in Death", y = "Number of Deaths") +
  theme_minimal()

Narrative:

The Fatal Encounters data set reveals critical insights into the circumstances surrounding people killed during interactions with police across the United States. The analysis begins with a bar chart illustrating fatal encounters by gender, highlighting a concerning trend where males significantly outnumber females in such incidents. Further investigation into the causes of death identifies the highest level of force applied, with a notable concentration of deaths attributed to gunshots and vehicles.

Examining the age distribution of decedents, it becomes evident that young adults, particularly those in their 20s and 30s, are disproportionately affected. The geographical scope of the data illustrates stark variations in fatal encounters across states, with certain regions reporting significantly higher fatalities and potentially reflecting systemic issues within those areas.

Lastly, the analysis tracks fatalities over time, revealing an alarming upward trend in deaths in recent years, underscoring a growing public health crisis. Together, these figures paint a harrowing picture of the dynamics of fatal encounters, highlighting urgent needs for policy reform and community intervention to address these pressing issues.