Closed wesnm closed 2 years ago
Thanks for raising this issue. I'll need to fix it a little bit differently to avoid issues with other APIs so will be rejecting this pull request, but will fix in the new development version.
Addressed here, please try out the dev version and let me know if it works or if you run into issues. You can get the dev version with:
# install.packages("devtools")
devtools::install_github("hrecht/censusapi")
Appears to be working, at least the datasets that I was having issues with.
Several variables in timeseries/intltrade/imports have numerals in their names, but are not numeric data. Adding "UNIT_QY" (a quantity unit of measure field) and "_FLAG" (a flag field) to string_col_parts account for these fields prevents NA from the numeric conversion.
See: https://api.census.gov/data/timeseries/intltrade/imports/hs/variables.html