[R] Error in running get_acs()
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Wed Apr 9 20:03:03 CEST 2025
The tidycensus package is a contributed package, it's not part of R.
You should probably report this to its maintainers at
https://github.com/walkerke/tidycensus/issues
Duncan Murdoch
On 2025-04-09 12:15 p.m., Deana Kittaneh via R-help wrote:
> Hi R team!
> Since last Friday 04/04, my team and I have faced an error with running the 'get_acs()' command from the tidycensus package. The code we ran and the error message we received are shown below. Our troubleshooting efforts showed that:
>
> 1. When we run the code with geometries turned off, the code runs as intended, but once geometry is made TRUE the code does not work.
> 2. We checked geometry = TRUE with various geographies (block group, place, county) and the error remained the same
> 3. We were still able to download and use the shapefile data from the Census Tigerlines folders online, which led us to suspect the error may be within R since the shapefiles are functional on the Census website.
>
> Thanks for the help!
>
> Code that works (geometry is FALSE here):
> #median household income for IL by tract
> acs <- get_acs(geography = "tract",
> table = "B19013", #can turn off if variables specified
> state = "IL",
> year = 2023,
> geometry = FALSE, #FALSE removes geometry, TRUE keeps it
> cache_table = TRUE)
>
> Code that doesn't work (geometry is TRUE here)
> #median household income for IL by tract
> acs <- get_acs(geography = "tract",
> table = "B19013", #can turn off if variables specified
> state = "IL",
> year = 2023,
> geometry = TRUE, #FALSE removes geometry, TRUE keeps it
> cache_table = TRUE)
>
> Error message:
> Getting data from the 2019-2023 5-year ACS
> Downloading feature geometry from the Census website. To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
> Loading ACS5 variables for 2023 from table B19013 and caching the dataset for faster future access.
> Using FIPS code '17' for state 'IL'
> Error : Cannot open "C:\Users\DKittaneh\AppData\Local\Temp\RtmpQpm4Z8"; The source could be corrupt or not supported. See `st_drivers()` for a list of supported formats.
> In addition: Warning message:
> In unzip(file_loc, exdir = tmp) : error 1 in extracting from zip file
> Error: Your geometry data download failed. Please try again later or check the status of the Census Bureau website at https://www2.census.gov/geo/tiger/
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list