From 2f10909c6ee1454b7bf0c7968d02c55b39888fc3 Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Tue, 26 Mar 2024 10:52:45 -0700 Subject: [PATCH] patch urban areas for 2023 --- DESCRIPTION | 4 ++-- R/metro_areas.R | 5 ++++- R/tigris-package.R | 2 +- man/tigris.Rd | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 24bf3ab..89988db 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: tigris Type: Package Title: Load Census TIGER/Line Shapefiles -Version: 2.0.6 -Date: 2024-01-23 +Version: 2.1.1 +Date: 2024-03-26 Authors@R: c( person(given="Kyle", family="Walker", email="kyle@walker-data.com", role=c("aut", "cre")), person(given="Bob", family="Rudis", email="bob@rudis.net", role="ctb") diff --git a/R/metro_areas.R b/R/metro_areas.R index 49afc53..9f1e0d7 100644 --- a/R/metro_areas.R +++ b/R/metro_areas.R @@ -125,7 +125,10 @@ urban_areas <- function(cb = FALSE, year = NULL, criteria = NULL, ...) { } else { - if (!is.null(criteria) && criteria == "2020") { + if (year >= 2023) { + url <- sprintf("https://www2.census.gov/geo/tiger/TIGER%s/UAC/tl_%s_us_uac20.zip", + cyear, cyear) + } else if (!is.null(criteria) && criteria == "2020") { if (year != 2020) { stop("2020 criteria is only supported when `year` is set to 2020 at the moment.", call. = FALSE) } diff --git a/R/tigris-package.R b/R/tigris-package.R index 71e2f08..5bc99c4 100644 --- a/R/tigris-package.R +++ b/R/tigris-package.R @@ -11,7 +11,7 @@ #' Shapefiles. e.g. \code{options(tigris_refresh=TRUE)} #' #' Use option \code{tigris_year} to change the year for which you'd like to download data. -#' e.g. \code{options(tigris_year = 2017)}. The default year for the package is 2020. +#' e.g. \code{options(tigris_year = 2017)}. The default year for the package is 2022. #' #' Use option \code{tigris_class} to specify the class of spatial object you'd like returned. #' The default is \code{"sf"} for simple features objects. If you'd like a legacy object diff --git a/man/tigris.Rd b/man/tigris.Rd index 52d9b83..eaa93f1 100644 --- a/man/tigris.Rd +++ b/man/tigris.Rd @@ -17,7 +17,7 @@ Use option \code{tigris_refresh} to force a refresh of cached \code{tigris} Shapefiles. e.g. \code{options(tigris_refresh=TRUE)} Use option \code{tigris_year} to change the year for which you'd like to download data. -e.g. \code{options(tigris_year = 2017)}. The default year for the package is 2020. +e.g. \code{options(tigris_year = 2017)}. The default year for the package is 2022. Use option \code{tigris_class} to specify the class of spatial object you'd like returned. The default is \code{"sf"} for simple features objects. If you'd like a legacy object