From 9d4c3626693c2933e586cb7e019fb30b27186521 Mon Sep 17 00:00:00 2001 From: Christopher Prener Date: Mon, 1 Jun 2026 21:34:04 -0700 Subject: [PATCH 1/3] chore: bump version to 0.2.0 for next CRAN release (#75) Update version references in DESCRIPTION, NEWS.md, and cran-comments.md. Remove stale CRAN-SUBMISSION file from previous release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CRAN-SUBMISSION | 3 --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ cran-comments.md | 4 +--- 4 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION deleted file mode 100644 index fd29ab2..0000000 --- a/CRAN-SUBMISSION +++ /dev/null @@ -1,3 +0,0 @@ -Version: 0.1.2 -Date: 2025-04-25 20:15:56 UTC -SHA: 037506c637abf35befe4953384a2be9e7d43343c diff --git a/DESCRIPTION b/DESCRIPTION index 96cf518..da916d0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: zippeR Title: Working with United States ZIP Code and ZIP Code Tabulation Area Data -Version: 0.1.2 +Version: 0.2.0 Authors@R: c( person( given = "Christopher", family = "Prener", email = "Christopher.Prener@pfizer.com", diff --git a/NEWS.md b/NEWS.md index 67c7346..f3b645a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# zippeR 0.2.0 + +* Bump version for next CRAN release + # zippeR 0.1.2 * Address issues with Census Bureau API being offline diff --git a/cran-comments.md b/cran-comments.md index 117d18e..707148f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,5 @@ ## Release summary -This version of `zippeR` is a patch for CRAN. The package has been updated to address the following issues: - -* The package was failing CRAN tests earlier this month due to the U.S. Census Bureau's servers being taken offline. If this were to happen in the future, the demographic functions now fail informatively. +This is a minor release of `zippeR` (0.2.0) for CRAN. ## Test environments * local macOS install: R 4.4.3 From a5520aadd44e2593966fdde5715faa48cabe86ec Mon Sep 17 00:00:00 2001 From: Christopher Prener Date: Mon, 1 Jun 2026 21:38:39 -0700 Subject: [PATCH 2/3] fix: resolve CRAN check issues for #95, #96, and #97 - #95: Replace markdown hyperlinks to HUD URLs with backtick-formatted code URLs in vignettes/converting-zips.Rmd to prevent CRAN URL checker from flagging HTTP 202 responses - #96: Add ^data-raw$ to .Rbuildignore to suppress CRAN NOTE about non-standard top-level directory - #97: Add .data and .env to globalVariables() in R/zi_globals.R for zi_load_uds to fix 'no visible binding' NOTE without adding rlang as an explicit dependency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .Rbuildignore | 1 + R/zi_globals.R | 2 +- man/zi_crosswalk.Rd | 2 +- man/zi_get_geometry.Rd | 2 +- man/zi_list_zctas.Rd | 2 +- man/zi_load_crosswalk.Rd | 2 +- vignettes/converting-zips.Rmd | 4 ++-- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 9be48e9..1bcc199 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -29,3 +29,4 @@ ^\.positai$ ^\.claude$ ^\.lintr$ +^data-raw$ diff --git a/R/zi_globals.R b/R/zi_globals.R index 4a08bce..5e1fd50 100644 --- a/R/zi_globals.R +++ b/R/zi_globals.R @@ -17,7 +17,7 @@ utils::globalVariables(c("PO_NAME", "STATE", "ZIP_TYPE", "destination_area", "destination_state", "scf_id", "scf_name", "scf_state")) ## zi_load_uds -utils::globalVariables(c("po_name", "zcta", "zip", "zip_type")) +utils::globalVariables(c(".data", ".env", "po_name", "zcta", "zip", "zip_type")) ## zi_prep_hud utils::globalVariables(c("STATEFP", "STUSPS", "bus_ratio", "fips", "geoid", diff --git a/man/zi_crosswalk.Rd b/man/zi_crosswalk.Rd index ef69329..3a7b56c 100644 --- a/man/zi_crosswalk.Rd +++ b/man/zi_crosswalk.Rd @@ -44,7 +44,7 @@ data frame containing a custom dictionary; specifies the column name in the dictionary object that contains ZCTAs, GEOIDs, or other values.} \item{year}{Optional four-digit numeric scalar for year; varies based on source. -For \code{"UDS"}, years 2009 through 2023 are available. For \code{"HUD"}, +For \code{"UDS"}, years 2009 through 2022 are available. For \code{"HUD"}, years 2010 through 2024 are available. Does not need to be specified when a custom dictionary is used.} diff --git a/man/zi_get_geometry.Rd b/man/zi_get_geometry.Rd index a35d4da..6cef4f9 100644 --- a/man/zi_get_geometry.Rd +++ b/man/zi_get_geometry.Rd @@ -22,7 +22,7 @@ zi_get_geometry( } \arguments{ \item{year}{A four-digit numeric scalar for year. \code{zippeR} currently -supports data between 2010 and 2023} +supports data between 2010 and 2024} \item{style}{A character scalar - either \code{"zcta5"} or \code{"zcta3"}. See Details below.} diff --git a/man/zi_list_zctas.Rd b/man/zi_list_zctas.Rd index 4bcdd3e..9147048 100644 --- a/man/zi_list_zctas.Rd +++ b/man/zi_list_zctas.Rd @@ -8,7 +8,7 @@ zi_list_zctas(year, state, method) } \arguments{ \item{year}{A four-digit numeric scalar for year. \code{zippeR} currently -supports data between 2010 and 2021.} +supports data between 2010 and 2024.} \item{state}{A scalar or vector with state abbreviations (e.x. \code{"MO"}) or FIPS codes (e.x. \code{29}).} diff --git a/man/zi_load_crosswalk.Rd b/man/zi_load_crosswalk.Rd index b0a39ee..248f872 100644 --- a/man/zi_load_crosswalk.Rd +++ b/man/zi_load_crosswalk.Rd @@ -19,7 +19,7 @@ crosswalk data. This can be one of either \code{"UDS"} (default) or \code{"HUD"}.} \item{year}{Required four-digit numeric scalar for year; varies based on source. -For \code{"UDS"}, years 2009 through 2023 are available. For \code{"HUD"}, +For \code{"UDS"}, years 2009 through 2022 are available. For \code{"HUD"}, years 2010 through 2024 are available.} \item{qtr}{Numeric scalar, required when \code{zip_code} is \code{"HUD"}. diff --git a/vignettes/converting-zips.Rmd b/vignettes/converting-zips.Rmd index 1070ce8..43a41ce 100644 --- a/vignettes/converting-zips.Rmd +++ b/vignettes/converting-zips.Rmd @@ -58,9 +58,9 @@ If `"UDS"` is given for `zip_source` with a `year` between 2009 and 2022, `zi_cr ## HUD's ZIP Code to Census Geography Crosswalks -The U.S. Housing and Urban Development (HUD) Department provides ZIP code to Census geography crosswalks that can be used to convert ZIP codes to Census Tracts, counties, and other geographies. These data are available through the [HUD User website](https://www.huduser.gov/portal/datasets/usps_crosswalk.html). Unlike the UDS files, ZIP Code Tabulation Areas are not one of the geographies including. If HUD data are used, be aware of ZIP Codes mapping into multiple Census Tracts, counties, etc. Many users may want to pick a "most likely" county (or other Census geometry) based on the proportion of commercial or residential customers. +The U.S. Housing and Urban Development (HUD) Department provides ZIP code to Census geography crosswalks that can be used to convert ZIP codes to Census Tracts, counties, and other geographies. These data are available through the HUD User website (`https://www.huduser.gov/portal/datasets/usps_crosswalk.html`). Unlike the UDS files, ZIP Code Tabulation Areas are not one of the geographies including. If HUD data are used, be aware of ZIP Codes mapping into multiple Census Tracts, counties, etc. Many users may want to pick a "most likely" county (or other Census geometry) based on the proportion of commercial or residential customers. -To use the HUD data, users must first obtain an API key from the [HUD User website](https://www.huduser.gov/portal/dataset/uspszip-api.html). Once you have an API key, they can use `zi_load_crosswalk()` to download the data either by passing the key directly to the function or by storing the key in their [.Rprofile](https://docs.posit.co/ide/user/ide/guide/environments/r/managing-r.html) under the object name `hud_key`: +To use the HUD data, users must first obtain an API key from the HUD User website (`https://www.huduser.gov/portal/dataset/uspszip-api.html`). Once you have an API key, they can use `zi_load_crosswalk()` to download the data either by passing the key directly to the function or by storing the key in their [.Rprofile](https://docs.posit.co/ide/user/ide/guide/environments/r/managing-r.html) under the object name `hud_key`: ```r Sys.setenv(hud_key = "") From 26452ba67c170363076bc5b9a469efa1f6393801 Mon Sep 17 00:00:00 2001 From: Christopher Prener Date: Mon, 1 Jun 2026 22:00:37 -0700 Subject: [PATCH 3/3] docs: add CHANGELOG entries for #75, #95, #96, and #97 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9361e61..62e5225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,8 +50,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix `zi_convert()` using `substitute(input_var)` instead of `substitute(output_var)` when `output_var` is specified, which caused the input column to be overwritten instead of creating a new output column (#33) - Replace live Census API calls in `test_zi_aggregate.R` with local fixtures so `R CMD check` passes on CRAN without a Census API key (#6) - Normalize non-standard column names in 2015 UDS crosswalk (`zcta_use` → `zcta`, etc.) so `zi_load_crosswalk(zip_source = "UDS", year = 2015)` no longer errors (#5) +- Add `.data` and `.env` to `zi_load_uds` `globalVariables()` to resolve R CMD check NOTE on no visible binding (#97) +- Add `^data-raw$` to `.Rbuildignore` to suppress CRAN NOTE on top-level `data-raw/` directory (#96) +- Wrap HUD portal URLs in backticks in `vignettes/converting-zips.Rmd` to suppress CRAN WARNING from HTTP 202 responses (#95) ### Changed +- Bump version to 0.2.0 (#75) - Replace `\donttest{}` / `\dontrun{}` wrappers in roxygen2 examples with `@examplesIf interactive()` (network-dependent examples) and `@examplesIf nzchar(Sys.getenv("hud_key"))` (HUD API key examples) across all 9 affected source files (#77) - Document NULL return values in `@return` tags for `zi_get_demographics()`, `zi_get_geometry()`, and `zi_aggregate()` (#12) - Remove all manual `@usage` roxygen2 tags; usage sections now auto-generated (#19)