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

Update Decennial census examples for upcoming API endpoint changes #42

Closed hrecht closed 6 years ago

hrecht commented 6 years ago

The Census Bureau is renaming some of the Decennial Census API endpoints at the end of August (per email).

This package will have no problems retrieving data using the new names, however the examples should be updated to reflect the new names around that date. Decennial Census examples should be removed material that is in the next CRAN release in order to avoid confusion.

hrecht commented 6 years ago

Update for users following this issue: the new ‘dec/sf1’ endpoint for 2010 decennial data, launching at the end of August, will contain a number of major differences in data organization. Many variables will be renamed, but the Census Bureau is not making a variable crosswalk from old to new names at this time. In addition, (as of this week) concept labels will no longer be used for this API endpoint and group labels (e.g. H16) will be used instead in the variable metadata.

I do not anticipate issues with this package handling the new data format. However, this is one of the biggest changes I’ve seen to an underlying Census API dataset in my years of using them. I do expect a learning curve for people to get used to the new variables and particularly the use of group labels rather than concept descriptions.

You can see the new metadata with

dec <- listCensusMetadata(name = "dec/sf1", vintage = 2010, type = "variables")

or at https://api.census.gov/data/2010/dec/sf1/variables.html

I am in touch with the Census Bureau staff about some of the issues that these changes will cause, and encourage you to weigh in as well. If you are working with 2010 decennial data after August 30, you will need to make changes in your older code at that time as the current 2010 sf1 endpoint will be decommissioned.

hrecht commented 6 years ago

All 2010 decennial Census examples have now been updated in version 0.4.1, which will be submitted to CRAN before August 30. See: https://hrecht.github.io/censusapi/articles/example-masterlist.html#decennial-census

hrecht commented 6 years ago

The option to retrieve groups in listCensusMetadata was added per #45 in v0.4.1, which has been submitted to CRAN.