During the midst of the COVID-19 pandemic, Buffalo, New York, experienced a surge in violent crime. According to Byron Brown, who was the mayor at the time, the pandemic interrupted violence prevention programs creating a spike in homicides. In attempt to address the violence, the Buffalo Police Department focused on specific locations tied to shootings (Plants, 2021).
The research documented in this paper focuses on Buffalo-based homicides which occurred between 1 January 2019 and 31 December 2022. The research identified several neighborhoods which experienced a higher volume of homicides, compared to other neighborhoods within Buffalo, New York.
The original data was obtained from the Buffalo Police Department via PENDATA Buffalo, an online open data portal. Through the crime data obtained from PENDATA Buffalo and through the use the R platform data wrangling techniques and visualization, analysis confirmed there was a spike in homicides between 2019 and 2020; resulting in an increase of 16 homicides throughout the city. Analysis indicated the three most violent neighborhoods, between the 2019 and 2022 time frame, were Broadway Fillmore (with a total of 27 homicides), Genesee-Moselle (with a total of 24 homicides), and Kensington-Bailey (with a total of 23 homicides).
# Load Packages
library(tidyverse)
library(janitor)
library(here)
library(skimr)
library(ggbeeswarm)
library(lubridate)
library(RColorBrewer)
# Read in Buffalo Homicide Data (and cleaned homicide package)
crime <- read_csv(here("data", "buffalocrime.csv"))
plothomicides <- read_csv(here("data", "cleanhomicide_new.csv"))
Before conducting any analysis, data processing was performed for easy manipulation. In this stage, the dataset was cleaned using the tidyverse and janitor libraries then separated into three categories (Day, Month, and Year). Since the original dataset included numerous criminal acts, the data was filtered to include only homicides. Additionally, calculations were included to assess the number of homicides which were reported in each neighborhood for each year; the summary results were named “homicide_count,” and then arranged by neighborhood and year.
cleancrime <- crime %>%
clean_names() %>%
rename(incident_category = parent_incident_type) %>%
select(case_number, incident_datetime, incident_category, neighborhood) %>%
separate(incident_datetime, c("day", "month", "year"), remove = FALSE) %>%
filter(incident_category == "Homicide") %>%
group_by(neighborhood) %>%
count(year) %>%
arrange(neighborhood, year) %>%
rename(homicide_count = n) %>%
mutate(loghomicide_count = log(homicide_count)) %>%
mutate(homicide_countdiff = homicide_count - lag(homicide_count)) %>%
mutate(deadliest = homicide_count > mean(homicide_count, na.rm = TRUE)) %>%
group_by(neighborhood) %>%
mutate(deadliest = homicide_count > mean(homicide_count, na.rm = TRUE))
To properly display progression of the homicide data, the year data was converted to a factor.
plothomicides$year <- as.factor(plothomicides$year)
glimpse(plothomicides)
## Rows: 393
## Columns: 6
## $ neighborhood <chr> "Allentown", "Allentown", "Allentown", "Allentown",…
## $ year <fct> 2006, 2010, 2012, 2014, 2017, 2019, 2021, 2007, 201…
## $ homicide_count <dbl> 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 12, 8, 2,…
## $ loghomicide_count <dbl> 0.0000000, 1.0986123, 0.0000000, 0.6931472, 0.00000…
## $ homicide_countdiff <dbl> NA, 2, -2, 1, -1, 0, 0, NA, -1, 2, -2, 0, 1, -1, NA…
## $ deadliest <lgl> FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE…
To confirm if there was a surge in homicides during the height of the pandemic as indicated by former-Mayor Brown, the homicide data for the entire city was plotted using the geom_boxplot code. As depicted in the following chart (see chart 1), from 2019 to 2020 there was a spike in homicides; however, the number of homicides gradually reduced from 2020 through 2022.
plothomicides %>%
na.omit() %>%
filter(year %in% c("2019", "2020", "2021", "2022")) %>%
filter(neighborhood %in% c("Broadway Fillmore", "Genesee-Moselle", "Kensington-Bailey")) %>%
group_by(year, neighborhood) %>%
ggplot(aes(x = year, y = homicide_count)) +
geom_boxplot(aes(color = year, fill = year))+
theme_light()+
labs(title = "Chart 1: Total Homicides in Buffalo",
subtitle = "1 Janaury 2019 - 31 December 2022",
caption = "Source: Buffalo Police Department, Crime Incidents, https://data.buffalony.gov/Public-Safety/Crime-Incidents/d6g9-xbgu.",
y= "Number of Homicides",
x = "")
To determine if this homicide trend was spread throughout all of the neighborhoods within Buffalo or concentrated in only a few, the data was plotted using a geom_violin code. As depicted in the following chart (see chart 2), the data suggested while there was a surge in homicides, a spike did not occur in every neighborhood.
plothomicides %>%
na.omit() %>%
filter(year %in% c("2019", "2020", "2021", "2022")) %>%
group_by(year, neighborhood) %>%
ggplot(aes(x = year, y = homicide_count)) +
geom_violin(aes(color = year, fill = year))+
geom_quasirandom() +
theme_light()+
labs(title = "Chart 2: Total Homicides in Buffalo ",
subtitle = "1 Janaury 2019 - 31 December 2022; Depicted by Year & Location",
caption = "Source: Buffalo Police Department, Crime Incidents, https://data.buffalony.gov/Public-Safety/Crime-Incidents/d6g9-xbgu.",
y= "Number of Homicides",
x = "")
To identify the most violent neighborhoods, the homicide data for the entire city, for the time frame of 2019 through 2022, was plotted using the geom_col code. The data was organized the data by neighborhood and total number of homicides. As depicted in the following chart (see chart 3), the results revealed three neighborhoods which had overall more homicides than the majority of neighborhoods: Broadway Fillmore, Genesee-Moselle, and Kensington-Bailey.
plothomicides %>%
na.omit() %>%
filter(year %in% c("2019", "2020", "2021", "2022")) %>%
filter(neighborhood != "UNKNOWN") %>%
filter(neighborhood != "Central") %>%
ggplot(aes(x = neighborhood, y = homicide_count))+
geom_col()+
coord_flip() +
theme_light()+
labs(title = "CHart 3: Total Homicides by Neighborhood",
subtitle = "1 Janaury 2019 - 31 December 2022",
caption = "Source: Buffalo Police Department, Crime Incidents, https://data.buffalony.gov/Public-Safety/Crime-Incidents/d6g9-xbgu.",
x= "Neighborhoods",
y = "Number of Homicides")
To determine if homicides increased within each of the most violent neighborhoods, the data from 2019 through 2022 was filtered to only include Broadway Fillmore, Genesee-Moselle, and Kensington-Bailey homicide data. The filtered homicide data was then plotted using the geom_col code. The data was organized by year and homicide count, separated into three distinct charts based on neighborhood using the facet_wrap code, and then color coded by year using the fill function. As depicted in the following chart (see chart 4), the records revealed both the Broadway Fillmore and Kensington-Bailey experienced a surge from 2019 to 2020; however, the Genesee-Moselle neighborhood had less reported homicides in 2020 (compared to 2019 and 2021).
#plot homicides 2020-present (most violent neighborhoods) - columns - TOTAL
plothomicides %>%
na.omit() %>%
filter(year %in% c("2019", "2020", "2021", "2022")) %>%
filter(neighborhood %in% c("Broadway Fillmore", "Kensington-Bailey", "Genesee-Moselle")) %>%
group_by(year, neighborhood) %>%
ggplot(aes(x = year, y = homicide_count))+
geom_col(aes(color = year, fill = year)) +
scale_fill_manual(values = c('red','blue','green','darkgoldenrod1'))+
facet_wrap(~neighborhood)+
theme_light()+
labs(title = "Chart 4: Total Homicide for the Three Most Violent Neighborhoods",
subtitle = "1 Janaury 2019 - 31 December 2022",
caption = "Source: Buffalo Police Department, Crime Incidents, https://data.buffalony.gov/Public-Safety/Crime-Incidents/d6g9-xbgu",
y = "Number of Homicides",
x = "")
The analysis presented in this document, confirmed there was a spike in violent crime (specifically homicides) between 2019 and 2020. Due to the limitations the COVID-19 pandemic, there were reductions to Buffalo Police Department’s violence prevention programs. Based on this information, there may be a correlation between the homicide spike and the pandemic. In order to validate this assessment, additional analysis will need to be preformed. Additional information pertaining to the community engagement and violence prevention programs would need to be obtained from the Buffalo Police Department.
Buffalo Police Department. 2023. PENDATA Buffalo. “Crime Incidents” https://data.buffalony.gov/Public-Safety/Crime-Incidents/d6g9-xbgu. Accessed 15 May 2023.
Plants, R. 2021. WGRZ. “Buffalo Police talk strategy to stem violent crime surge after 2 fatal shooting Sunday.” https://www.wgrz.com/article/news/crime/buffalo-police-department-talks-strategy-to-stem-violent-crime-surge/71-99d0e40d-1620-462c-a405-1a388a71b9be. Accessed 30 May 2023.