hrecht / censusapi

R package to retrieve U.S. Census data and metadata via API
https://www.hrecht.com/censusapi/
170 stars 31 forks source link

Switch from using html metadata to json to remove XML dependency #13

Closed hrecht closed 7 years ago

hrecht commented 7 years ago

E.g. use https://api.census.gov/data.json instead of https://api.census.gov/data.html in metadata functions. I don't anticipate any performance slowdowns from this (should be faster), but log html vs json run times and compare to be sure before release.

hrecht commented 7 years ago

Switching from json to html in listCensusApis added about a second to run time in several repeated tests. Still, this is preferable to the XML dependency and might be sped up through code optimization.

hrecht commented 7 years ago

Functional version for json metadata is in https://github.com/hrecht/censusapi/commit/2901e0251c6ab6a5ccee0b09a516a8c591e6dec7, but it depends on dplyr::bind_rows - for variables metadata since they're nastily nested. Need to refactor without dplyr before merging to master.

hrecht commented 7 years ago

Closed with https://github.com/hrecht/censusapi/commit/b0aad58b8f04a5b73c6ba3b0c005066e78be7648