walkerke / tidycensus

Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
https://walker-data.com/tidycensus
Other
639 stars 100 forks source link

"Part Of" Geography ACS Estimates. #298

Open willRootPolicy opened 4 years ago

willRootPolicy commented 4 years ago

Thank you for this great package.

I often need to analyse data that is the balance of an area (unincorporated county vs incorporated county, only the portion of a place that is within a county, or census tracts within a place, etc). With these types of analysis, it would be very helpful to have access to geography levels 155 (County within Place), 157 (State-County-Estimates Universe Place/Balance (or part) within County) and 158 (Census Tract within Place). Please let me know if this functionality is under consideration and if not, how/if I can help.

Thank you! Will

walkerke commented 4 years ago

Thanks for your note! It doesn't appear that 157 and 158 are available via the API (see https://api.census.gov/data/2018/acs/acs5/geography.html). 155 is available though it would require building a new geography hierarchy that we don't currently support. One potential avenue would be to build in support for an arbitrary identifier that would allow for some of the other summary levels that we don't currently have. The other would be to use the censusapi package which gives you a lot more flexibility in how you send queries to the API, so you might take a look at that as well.