-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to pull state-wide 2017 ACS5 tract data via get_acs. #139
Comments
@larcat it's an API-level issue. The new 5-year ACS release is currently restricted to tract queries within counties. I'm going to see if Census will resolve this - otherwise I'll have to handle this internally within the package. |
Until the Census API is fixed, you could use a workaround similar to the one described here #136 (comment) and #121 (comment). Basically, you loop through each of the counties, repeating your library(tidyverse)
library(tidycensus)
test <- map_dfr(
filter(fips_codes, state == "KY")$county_code,
~get_acs(
variable = "B01001_001",
state = "KY",
county = .x,
year = 2017,
geography = "tract",
geometry = FALSE,
cache_table = TRUE
)
)
#> Getting data from the 2013-2017 5-year ACS
head(test)
#> # A tibble: 6 x 5
#> GEOID NAME variable estimate moe
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 210019701… Census Tract 9701, Adair County, Ken… B01001_0… 1630 204
#> 2 210019702… Census Tract 9702, Adair County, Ken… B01001_0… 1846 202
#> 3 210019703… Census Tract 9703, Adair County, Ken… B01001_0… 3159 351
#> 4 210019704… Census Tract 9704.01, Adair County, … B01001_0… 4657 413
#> 5 210019704… Census Tract 9704.02, Adair County, … B01001_0… 4174 378
#> 6 210019705… Census Tract 9705, Adair County, Ken… B01001_0… 2271 247 Created on 2018-12-12 by the reprex package (v0.2.1) |
Your code now works as of this morning, @larcat. |
Thank you all for the responses! |
Still works fine for 2016, etc. See below. Dunno if this is a census issue or a tidycensus issue.
The text was updated successfully, but these errors were encountered: