CenterOnBudget / getcensus

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

Revise getcensus error message to flag that an update is needed #64

Closed shingtgen closed 1 year ago

shingtgen commented 1 year ago

Is your feature request related to a problem? Please describe. I ran getcensus b09020_008 b09020_009, dataset(5) and got an error saying "5-year ACS estimates for 2021 have not yet been released. See the ACS data release page on the Census website." But, the issue for me was not that the data weren't available but that I needed to update the program.

Describe the solution you'd like I think the most helpful would be to revise the error message to warn that you need to update getcensus, if that's feasible. I'm not at all familiar with the getcensus code so there could be a limitation I'm not aware of. Please let me know if I can be helpful with this.

shingtgen commented 1 year ago

I ran as a test: getcensus b09020_008 b09020_009, sample(5) year(2022) clear

and got the following message, with helpful links to update getcensus and to the ACS release page. Looks great!

Cannot fetch 5-year ACS estimates for 2022. This may be because: • You need to update getcensus. To update, run ado update getcensus, update. • The 2022 5-year estimates have not yet been released. Check the ACS data release page on the Census Bureau website.