From 11e07e7fb8f39362b96c124c3e62599fe2b3928d Mon Sep 17 00:00:00 2001 From: Mariya Petukhova Date: Tue, 22 Oct 2024 15:39:08 -0500 Subject: [PATCH] Add year 2024 to congessional_district() --- R/legislative.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/legislative.R b/R/legislative.R index 9ac5760..a8eae48 100644 --- a/R/legislative.R +++ b/R/legislative.R @@ -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) { @@ -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"]