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

Label variables using most recent year in years() option #24

Closed c-zippel closed 4 years ago

c-zippel commented 4 years ago

Instead of labeling variables with the 2018 data dictionary regardless of which year(s) of data the user requested, we could use the local recentyear (line 128) to label with the data dictionary for the most recent year in the user's range. recentyear is used by the getcensus_catalog subroutine to choose which year's API data dictionary to load if the user passes multiple years to the years option. This would require changing the getcensus_main syntax so that recentyear is passed from getcensus to the getcensus_main subroutine.