Skip to content

Fix PUMA TIGER URL for 2024 (use PUMA20 directory)#214

Open
ashleyasmus wants to merge 2 commits intowalkerke:masterfrom
ashleyasmus:fix/puma20-url
Open

Fix PUMA TIGER URL for 2024 (use PUMA20 directory)#214
ashleyasmus wants to merge 2 commits intowalkerke:masterfrom
ashleyasmus:fix/puma20-url

Conversation

@ashleyasmus
Copy link

@ashleyasmus ashleyasmus commented Feb 12, 2026

Summary

Fixes tigris::pumas(cb = FALSE, year = 2024) downloads by using the correct TIGER directory (PUMA20) for 2020-based PUMA boundaries. (Closes #213)

Problem

For 2024 PUMA data, pumas() requests puma20 files (e.g. tl_2024_18_puma20.zip) but was constructing URLs under .../TIGER{year}/PUMA/, which does not contain those files. This causes download failures with HTTP and FTP fallback.

HTTP links:

Fix

When cb = FALSE:

  • Use PUMA20 directory for year > 2021
  • Otherwise use PUMA
  • Preserve the existing filename pattern tl_<year>_<state>_puma<suf>.zip

Repro

library(tigris)
pumas(state = "Indiana", cb = FALSE, year = 2024)

@ashleyasmus ashleyasmus changed the title Update PUMA URL construction to include directory based on year. Fix PUMA TIGER URL for 2022+ (use PUMA20 directory) Feb 12, 2026
@ashleyasmus ashleyasmus changed the title Fix PUMA TIGER URL for 2022+ (use PUMA20 directory) Fix PUMA TIGER URL for 2024 (use PUMA20 directory) Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pumas(cb = FALSE, year = 2024) uses wrong TIGER directory (/PUMA/ vs /PUMA20/) → download fails

1 participant