ipums / ipumsr

Request, download, and read IPUMS data in R
https://tech.popdata.org/ipumsr/
Mozilla Public License 2.0
20 stars 4 forks source link

Update example data #40

Closed robe2037 closed 1 year ago

robe2037 commented 1 year ago

Updates CPS files used in example data to be consistent with current EE version. Scripts generating these data sources via API have been added for reproducibility to data-raw.

Because these files are now generated via API, the file names cannot easily be maintained across ipumsr versions. When data files are updated, their corresponding file names will be updated automatically. We cannot change file names manually to maintain consistency because the contents of the .xml files will still contain references to the new file name. The consequence is that the available file names to ipums_example() will be changed when data files are updated. Given that this has no use in any scripting or analysis context, I think it is an worthwhile change to maintain updated data files.

This also includes an update to the codeInstr parsing in get_var_info_from_ddi(). XML files now contain "Codes" text at the start of these entries, which was tripping up the parsing of val_labels in some cases.