You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I can't stop raving about this package. What a contribution to the research community!
I noticed that the show_call flag in get_acs() is not working as expected for "tract" and "block group" settings. It doesn't return the unified API call that I'd expect. Here's an example:
Getting data from the 2016-2020 5-year ACS
Fetching tract data by state and combining the result.
Census API call: https://api.census.gov/data/2020/acs/acs5?get=B01001_001E%2CB01001_001M%2CB17001_001E%2CB17001_001M%2CNAME&for=tract%3A%2A&in=state%3A39%2C36
# A tibble: 17,158 × 5
GEOID NAME variable estimate moe
<chr> <chr> <chr> <dbl> <dbl>
1 39001770100 Census Tract 7701, Adams County, Ohio total_population 4498 444
2 39001770100 Census Tract 7701, Adams County, Ohio total_poverty_status 4498 444
3 39001770200 Census Tract 7702, Adams County, Ohio total_population 4786 481
4 39001770200 Census Tract 7702, Adams County, Ohio total_poverty_status 4669 455
5 39001770301 Census Tract 7703.01, Adams County, Ohio total_population 3781 683
6 39001770301 Census Tract 7703.01, Adams County, Ohio total_poverty_status 3781 683
7 39001770302 Census Tract 7703.02, Adams County, Ohio total_population 3385 557
8 39001770302 Census Tract 7703.02, Adams County, Ohio total_poverty_status 3385 557
9 39001770400 Census Tract 7704, Adams County, Ohio total_population 4528 432
10 39001770400 Census Tract 7704, Adams County, Ohio total_poverty_status 4240 447
# … with 17,148 more rows
Instead, it doesn't show any call:
Getting data from the 2016-2020 5-year ACS
Fetching tract data by state and combining the result.
# A tibble: 17,158 × 5
GEOID NAME variable estimate moe
<chr> <chr> <chr> <dbl> <dbl>
1 39001770100 Census Tract 7701, Adams County, Ohio total_population 4498 444
2 39001770100 Census Tract 7701, Adams County, Ohio total_poverty_status 4498 444
3 39001770200 Census Tract 7702, Adams County, Ohio total_population 4786 481
4 39001770200 Census Tract 7702, Adams County, Ohio total_poverty_status 4669 455
5 39001770301 Census Tract 7703.01, Adams County, Ohio total_population 3781 683
6 39001770301 Census Tract 7703.01, Adams County, Ohio total_poverty_status 3781 683
7 39001770302 Census Tract 7703.02, Adams County, Ohio total_population 3385 557
8 39001770302 Census Tract 7703.02, Adams County, Ohio total_poverty_status 3385 557
9 39001770400 Census Tract 7704, Adams County, Ohio total_population 4528 432
10 39001770400 Census Tract 7704, Adams County, Ohio total_poverty_status 4240 447
# … with 17,148 more rows
I assume that the state-wise split for small geographies is for efficiency, since the Census API can handle a multi-state call by tract or block group? If so, I'd expect the unified API call (succinct, for documentation purposes) rather than the API call for each state individually (what's actually called).
The text was updated successfully, but these errors were encountered:
You have diagnosed this correctly - originally multi-state small geography calls weren't possible in the API, but that has since changed and we don't use that feature. Instead we iterate through the states and make multiple calls.
I'm going to give some thought to this. It's possible that we make the switch internally to use the new multi-state functionality in the API; I want to do some performance tests. If we make that switch, this issue will resolve itself as the correct URL will be returned.
Hi there,
First of all, I can't stop raving about this package. What a contribution to the research community!
I noticed that the
show_call
flag inget_acs()
is not working as expected for "tract" and "block group" settings. It doesn't return the unified API call that I'd expect. Here's an example:What I'd expect:
Instead, it doesn't show any call:
I assume that the state-wise split for small geographies is for efficiency, since the Census API can handle a multi-state call by tract or block group? If so, I'd expect the unified API call (succinct, for documentation purposes) rather than the API call for each state individually (what's actually called).
The text was updated successfully, but these errors were encountered: