Summary
zi_list_zctas() currently hard-blocks year = 2024 (R/zi_list_zctas.R lines 66–71) with the message:
year 2024 is not yet available for zi_list_zctas(). Use 2023 or earlier.
The underlying build script (inst/build-data/build_vectors.R) already downloads and processes 2024 ZCTA data from tigris and writes both intersect and centroid reference vectors into R/sysdata.rda. The restriction exists because sysdata.rda shipped with the package has not yet been regenerated with the 2024 vectors included.
Steps to resolve
- Run
source("inst/build-data/build_vectors.R") interactively (requires tigris, sf, dplyr, purrr and internet access to Census TIGER/Line).
- Verify the regenerated
R/sysdata.rda contains reference_intersects and reference_centroids rows for year == 2024.
- Remove the year-2024 error block in
R/zi_list_zctas.R (lines 66–71).
- Update tests in
tests/testthat/test_zi_list_zctas.R to cover year = 2024.
- Run
devtools::check() to confirm no regressions.
Acceptance criteria
zi_list_zctas(year = 2024, state = "MO", method = "centroid") returns a character vector of ZCTAs without error.
zi_list_zctas(year = 2024, state = "MO", method = "intersect") returns a character vector of ZCTAs without error.
- All existing tests continue to pass.
Notes
- The build script is interactive (prompts whether to use local data). Answer appropriately based on whether pre-downloaded
.rda files exist under inst/data-raw/.
- This is a human-driven task — the build script downloads ~14 years of ZCTA shapefiles and performs spatial joins, which takes significant time and requires manual oversight.
Summary
zi_list_zctas()currently hard-blocksyear = 2024(R/zi_list_zctas.R lines 66–71) with the message:The underlying build script (
inst/build-data/build_vectors.R) already downloads and processes 2024 ZCTA data fromtigrisand writes both intersect and centroid reference vectors intoR/sysdata.rda. The restriction exists becausesysdata.rdashipped with the package has not yet been regenerated with the 2024 vectors included.Steps to resolve
source("inst/build-data/build_vectors.R")interactively (requirestigris,sf,dplyr,purrrand internet access to Census TIGER/Line).R/sysdata.rdacontainsreference_intersectsandreference_centroidsrows foryear == 2024.R/zi_list_zctas.R(lines 66–71).tests/testthat/test_zi_list_zctas.Rto coveryear = 2024.devtools::check()to confirm no regressions.Acceptance criteria
zi_list_zctas(year = 2024, state = "MO", method = "centroid")returns a character vector of ZCTAs without error.zi_list_zctas(year = 2024, state = "MO", method = "intersect")returns a character vector of ZCTAs without error.Notes
.rdafiles exist underinst/data-raw/.