Skip to content

Commit

Permalink
Merge pull request #190 from mpetuk/refresh2024
Browse files Browse the repository at this point in the history
Add year 2024 to congressional_district()
  • Loading branch information
walkerke authored Nov 4, 2024
2 parents 2f10909 + 11e07e7 commit f4399b9
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit f4399b9

Please sign in to comment.