Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add year 2024 to congressional_district() #190

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions R/legislative.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ congressional_districts <- function(state = NULL, cb = FALSE, resolution = '500k
congress <- "111"
} else if (year %in% 2022:2023) {
congress <- "118"
} else if (year == 2024) {
congress <- "119"
}

if (year < 2010) {
Expand All @@ -85,8 +87,8 @@ congressional_districts <- function(state = NULL, cb = FALSE, resolution = '500k
if (year == 2013) url <- gsub("shp/", "", url)

} else {
# Have to handle 2022 and 2023 differently as national CD file is not available
if (year %in% 2022:2023) {
# Have to handle 2022 through 2024 differently as national CD file is not available
if (year %in% 2022:2024) {
if (is.null(state)) {
state_codes <- unique(tigris::fips_codes$state_code)
state_codes <- state_codes[state_codes != "74"]
Expand Down
Loading