CenterOnBudget / getcensus

Load American Community Survey data from the U.S. Census Bureau API into Stata
https://centeronbudget.github.io/getcensus/
MIT License
15 stars 3 forks source link

First row of API response occasionally not parsed as variable names #45

Closed c-zippel closed 3 years ago

c-zippel commented 3 years ago

Instead, variables are named v1, v2, etc., and thus dropped (line 510) To fix, add option varnames(1) to import delimited.

Not sure why this happens sometime and not all the time.

Fails:

getcensus B05009, geography(state) clear https://api.census.gov/data/2019/acs/acs1?get=group(B05009)NAME&for=state:*

Works:

getcensus B19013, geography(state) clear https://api.census.gov/data/2019/acs/acs1?get=group(B19013)NAME&for=state:*

getcensus B05009, geography(us) clear https://api.census.gov/data/2019/acs/acs1?get=group(B05009)NAME&for=us:*