Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
^\.positai$
^\.claude$
^\.lintr$
^data-raw$
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ 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)
- Fix pkgdown CI build failure caused by non-empty `docs/` directory conflict; pkgdown now builds to `_site/` (#70)
- Replace `JamesIves/github-pages-deploy-action` with first-party OIDC-based `actions/upload-pages-artifact` + `actions/deploy-pages` to resolve GitHub Pages deployment permission error (#74)

### 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)
Expand Down
3 changes: 0 additions & 3 deletions CRAN-SUBMISSION

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/zi_globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/zi_crosswalk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/zi_get_geometry.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/zi_list_zctas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/zi_load_crosswalk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/converting-zips.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<PASTE KEY>")
Expand Down
Loading