The article chosen for this assignment is titled “The Republican Path To A House Majority Goes Through The Suburbs”. The paper talks about the role suburban populations have played in election outcomes as they are more politically competitive compared to urban or rural seats.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(readr)
url <- "https://raw.githubusercontent.com/Amish22/DS607Assignment1/main/urbanization-index-2022.csv"
dataset <- read_csv(url)
## `curl` package not installed, falling back to using `url()`
## Rows: 435 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): stcd, state, grouping
## dbl (7): cd, pvi_22, urbanindex, rural, exurban, suburban, urban
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(dataset)
## # A tibble: 6 × 10
## stcd state cd pvi_22 urbanindex rural exurban suburban urban grouping
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 NY-12 NY 12 67.8 14.9 0 0 0 100 Dense Urban
## 2 NY-07 NY 7 62.8 14.9 0 0 0 100 Dense Urban
## 3 NY-09 NY 9 51.1 14.7 0 0 0 100 Dense Urban
## 4 NY-13 NY 13 77.1 14.7 0 0 0 100 Dense Urban
## 5 NY-15 NY 15 70.8 14.7 0 0 0 100 Dense Urban
## 6 NY-10 NY 10 69.2 14.7 0 0 0 100 Dense Urban
subset_dataset <- dataset %>%
select(
District = stcd,
State = state,
PVI = pvi_22,
UrbanIndex = urbanindex,
Grouping = grouping
)
head(subset_dataset)
## # A tibble: 6 × 5
## District State PVI UrbanIndex Grouping
## <chr> <chr> <dbl> <dbl> <chr>
## 1 NY-12 NY 67.8 14.9 Dense Urban
## 2 NY-07 NY 62.8 14.9 Dense Urban
## 3 NY-09 NY 51.1 14.7 Dense Urban
## 4 NY-13 NY 77.1 14.7 Dense Urban
## 5 NY-15 NY 70.8 14.7 Dense Urban
## 6 NY-10 NY 69.2 14.7 Dense Urban
As highlighted in the article, many of the closely contested races are occurring in suburban zones, with both parties seeking control in districts that can swing either way.
To build upon this work, future research could delve deeper into the specific characteristics of suburban populations that contribute to their critical role in elections. This could involve examining demographic factors such as race, age, education levels, and socioeconomic status, which are often highly varied in suburban areas. By understanding how these variables correlate with voting behavior, we could gain a more nuanced view of what drives electoral outcomes in these regions.