The maps comparing 2021 and 2022 racial demographics show that Tennessee’s 5th congressional district, which was once a majority minority urban area, was split and merged into whiter surrounding districts after redistricting. This fragmentation is clearly visible in the 2022 map, suggesting a dispersal of minority voters.
The scatterplot of precinct data from Davidson County further supports this pattern. It shows that precincts with higher minority populations tended to support Harris, but many of these precincts no longer contributed to a Democratic district win. While not conclusive proof, the graphics suggest that redistricting diluted the voting strength of communities of color, aligning with key concerns in racial gerrymandering cases.
Code:
# Install required packages if not already installed
if (!require("tidyverse")) install.packages("tidyverse")
if (!require("tidycensus")) install.packages("tidycensus")
if (!require("sf")) install.packages("sf")
if (!require("mapview")) install.packages("mapview")
if (!require("leaflet")) install.packages("leaflet")
if (!require("leaflet.extras2")) install.packages("leaflet.extras2")
# Load libraries
library(tidyverse)
library(tidycensus)
library(sf)
library(mapview)
library(leaflet)
library(leafpop)
# Load variable dictionary (optional)
ProfileTables <- load_variables(2021, "acs5/profile", cache = TRUE)
# === 2021 DATA ===
mydata2021 <- get_acs(
geography = "congressional district",
state = "TN",
variables = "DP05_0037P", # Percent White alone
year = 2021,
survey = "acs1",
output = "wide",
geometry = TRUE
)
# Rename columns
mydata2021 <- mydata2021 %>%
rename(
Area = NAME,
`Pct. White` = DP05_0037PE,
Range = DP05_0037PM
)
# Interactive map for 2021
Map2021 <- mapview(
mydata2021,
zcol = "Pct. White",
layer.name = "Pct. White 2021",
popup = popupTable(
mydata2021,
feature.id = FALSE,
row.numbers = FALSE,
zcol = c("Area", "Pct. White", "Range")
)
)
Map2021
# Error bar plot for 2021
mygraph2021 <- ggplot(mydata2021, aes(x = `Pct. White`, y = reorder(Area, `Pct. White`))) +
geom_errorbarh(aes(xmin = `Pct. White` - Range, xmax = `Pct. White` + Range)) +
geom_point(size = 3, color = "#099d91") +
theme_minimal(base_size = 12.5) +
theme(axis.text.y = element_text(size = 5)) +
labs(
title = "Pct. White by Congressional District in Tennessee",
subtitle = "2021 ACS 1-Year Estimates (Error Bars Show Margin of Error)",
x = "2021 ACS Estimate (% White)",
y = ""
)
mygraph2021
# === 2022 DATA ===
mydata2022 <- get_acs(
geography = "congressional district",
state = "TN",
variables = "DP05_0037P",
year = 2022,
survey = "acs1",
output = "wide",
geometry = TRUE
)
# Rename columns
mydata2022 <- mydata2022 %>%
rename(
Area = NAME,
`Pct. White` = DP05_0037PE,
Range = DP05_0037PM
)
# Interactive map for 2022
Map2022 <- mapview(
mydata2022,
zcol = "Pct. White",
layer.name = "Pct. White 2022",
popup = popupTable(
mydata2022,
feature.id = FALSE,
row.numbers = FALSE,
zcol = c("Area", "Pct. White", "Range")
)
)
Map2022
# Error bar plot for 2022
mygraph2022 <- ggplot(mydata2022, aes(x = `Pct. White`, y = reorder(Area, `Pct. White`))) +
geom_errorbarh(aes(xmin = `Pct. White` - Range, xmax = `Pct. White` + Range)) +
geom_point(size = 3, color = "#099d91") +
theme_minimal(base_size = 12.5) +
theme(axis.text.y = element_text(size = 5)) +
labs(
title = "Pct. White by Congressional District in Tennessee",
subtitle = "2022 ACS 1-Year Estimates (Error Bars Show Margin of Error)",
x = "2022 ACS Estimate (% White)",
y = ""
)
mygraph2022
# Load the data
Davidson2024 <- read.csv("https://github.com/drkblake/Data/raw/refs/heads/main/Davidson2024.csv")
# Scatterplot: % Minority vs % Harris vote, color by precinct winner
ggplot(Davidson2024, aes(x = Pct_Nonwhite, y = Pct_Harris, color = Winner)) +
geom_point(size = 2.5) +
geom_smooth(method = "lm", se = FALSE) +
labs(
x = "Percent Minority Population",
y = "Percent Voting for Harris",
color = "Precinct Winner",
title = "Support for Harris by Percent Minority Population",
caption = "Source: Davidson2024 dataset"
) +
scale_color_brewer(palette = "Set1") +
theme_minimal(base_size = 12)