hrecht / censusapi

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

Fix bug in JSON parser #44

Closed raheem03 closed 6 years ago

raheem03 commented 6 years ago

I don't have an archived version of the old metadata file, but several of the columns called in listCensusMetadata no longer exist (including "datetime" and "validValues"). Took a guess and replaced references to "validValues" with "values" and everything seems to be working, at least for 1- and 5-year ACS.

I didn't mess with anything else (e.g., reference to "datetime" is still there) because I wasn't sure if this would inadvertently affect other APIs (after skimming other APIs, doesn't seem like it would).

Hope this helps!

hrecht commented 6 years ago

Thank you @raheem03 ! It does indeed seem that the Census Bureau changed validValues to values. I fixed this bug in v0.4.1 before seeing this PR, so am closing without merging. But many thanks for the PR.

raheem03 commented 6 years ago

Perfect. And thanks for all your work on this while project!