From cee1e4ac10c1d213452404e4625a1fdf551f631c Mon Sep 17 00:00:00 2001 From: Paolo Di Lorenzo Date: Fri, 30 May 2025 12:15:59 -0400 Subject: [PATCH] Remove as_sf parameter --- NEWS.md | 6 +++++- R/fips-data.R | 1 - R/us-map.R | 4 ---- man/centroid_labels.Rd | 4 ---- man/fips_data.Rd | 4 ---- man/us_map.Rd | 4 ---- 6 files changed, 5 insertions(+), 18 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7c34bac..c68c0d5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ # [unreleased] +### Removed +* The `as_sf` parameter has been completely removed from `us_map()`, `centroid_labels()`, and `fips_data()`. + * It was no longer used by `usmap` nor did it have any effect if set. + * Any existing code that sets it can safely delete it from `usmapdata` function calls. + # usmapdata 0.5.0 Released Thursday, May 22, 2025. @@ -45,7 +50,6 @@ Released Sunday, February 4, 2024. This update continues the `sf` migration by setting the `as_sf` parameter to default to the behavior of `TRUE`. This parameter no longer has any effect, as explained below. The next phase will involve updating `usmap` to no longer make use of this parameter, in which case it can be completely removed. ### Removed - * The `as_sf` parameter is now deprecated and no longer has any effect. * As part of this removal, the default behavior for `us_map()`, `centroid_labels()`, and `fips_data()` is equivalent to `as_sf = TRUE` which is to return their data as an `sf` object (see `0.2.0` release notes for more details). * This parameter will be completely removed in a future version but continues to exist for compatibility reasons. diff --git a/R/fips-data.R b/R/fips-data.R index e2bf395..e8ed7ab 100644 --- a/R/fips-data.R +++ b/R/fips-data.R @@ -13,7 +13,6 @@ #' @export fips_data <- function( regions = c("states", "state", "counties", "county"), - as_sf = TRUE, data_year = NULL ) { regions <- match.arg(regions) diff --git a/R/us-map.R b/R/us-map.R index 3e6d8ea..2485c38 100644 --- a/R/us-map.R +++ b/R/us-map.R @@ -14,8 +14,6 @@ #' same name. The regions listed in the \code{include} parameter are applied first and the #' \code{exclude} regions are then removed from the resulting map. Any excluded regions #' not present in the included regions will be ignored. -#' @param as_sf Defunct, this parameter no longer has any effect and will be removed in -#' the future. #' @param data_year The year for which to obtain map data. #' If the value is \code{NULL}, the most recent year's data is used. If the #' provided year is not found from the available map data sets, the next most @@ -41,7 +39,6 @@ us_map <- function( regions = c("states", "state", "counties", "county"), include = c(), exclude = c(), - as_sf = TRUE, data_year = NULL ) { regions <- match.arg(regions) @@ -80,7 +77,6 @@ us_map <- function( #' @export centroid_labels <- function( regions = c("states", "state", "counties", "county"), - as_sf = TRUE, data_year = NULL ) { regions <- match.arg(regions) diff --git a/man/centroid_labels.Rd b/man/centroid_labels.Rd index ee3b7fa..a0b2519 100644 --- a/man/centroid_labels.Rd +++ b/man/centroid_labels.Rd @@ -6,7 +6,6 @@ \usage{ centroid_labels( regions = c("states", "state", "counties", "county"), - as_sf = TRUE, data_year = NULL ) } @@ -15,9 +14,6 @@ centroid_labels( (\code{"states"}, \code{"state"}, \code{"counties"}, \code{"county"}). The default is \code{"states"}.} -\item{as_sf}{Defunct, this parameter no longer has any effect and will be removed in -the future.} - \item{data_year}{The year for which to obtain map data. If the value is \code{NULL}, the most recent year's data is used. If the provided year is not found from the available map data sets, the next most diff --git a/man/fips_data.Rd b/man/fips_data.Rd index b7a85d5..cd789ad 100644 --- a/man/fips_data.Rd +++ b/man/fips_data.Rd @@ -6,7 +6,6 @@ \usage{ fips_data( regions = c("states", "state", "counties", "county"), - as_sf = TRUE, data_year = NULL ) } @@ -15,9 +14,6 @@ fips_data( (\code{"states"}, \code{"state"}, \code{"counties"}, \code{"county"}). The default is \code{"states"}.} -\item{as_sf}{Defunct, this parameter no longer has any effect and will be removed in -the future.} - \item{data_year}{The year for which to obtain map data. If the value is \code{NULL}, the most recent year's data is used. If the provided year is not found from the available map data sets, the next most diff --git a/man/us_map.Rd b/man/us_map.Rd index 672988a..ff7c2ee 100644 --- a/man/us_map.Rd +++ b/man/us_map.Rd @@ -8,7 +8,6 @@ us_map( regions = c("states", "state", "counties", "county"), include = c(), exclude = c(), - as_sf = TRUE, data_year = NULL ) } @@ -30,9 +29,6 @@ same name. The regions listed in the \code{include} parameter are applied first \code{exclude} regions are then removed from the resulting map. Any excluded regions not present in the included regions will be ignored.} -\item{as_sf}{Defunct, this parameter no longer has any effect and will be removed in -the future.} - \item{data_year}{The year for which to obtain map data. If the value is \code{NULL}, the most recent year's data is used. If the provided year is not found from the available map data sets, the next most