Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming Census API changes #29

Closed
jcdepth opened this issue Aug 2, 2017 · 7 comments
Closed

Upcoming Census API changes #29

jcdepth opened this issue Aug 2, 2017 · 7 comments

Comments

@jcdepth
Copy link

jcdepth commented Aug 2, 2017

Hi, I got an email from the Census today. It seems like there are some pretty major changes coming to how to query their API. The most relevant part of the email was:

Please note that beginning with the release of the 2016 ACS 1-Year estimates on September 14, 2017, the data will only be available in the new format. We will continue to maintain the 2015 1-Year estimates in the original format until October 2, 2017.

We will let you know when the 2015 ACS 5-Year estimates will be available in the new format. Eventually the remainder of the ACS products in the API will be converted to the new format and we will update you when we have a timeline for those releases. Please contact us via email at cnmp.developers.list@census.gov with any questions or concerns you might have.

There was a linked guide to the changes:
https://www.census.gov/content/dam/Census/data/developers/acs/acs-data-variables-guide.pdf

Does this mean there will have to be a rewriting of the functions in this package?

Thanks for all your hard work with censusapi, I use it on a daily basis.

@hrecht
Copy link
Owner

hrecht commented Aug 2, 2017

Thanks for posting - I didn't get the email!
I'll have to investigate further, it might require some internal function rewrites.

@murray-cecile
Copy link

Hi, I was wondering if you'd had a chance to check this out - mostly seems like it changes how it deals with annotation flags for missing values, controlled estimates, etc. But there also is a change to the url.

Here's the reminder email from Census, in case you didn't get it:

This is a reminder that the 2016 ACS 1-Year data will be released next Thursday. The data in the API will be released in a new format that includes the insertion of 'acs/' in the URI after the year and also includes separate annotation fields for each estimate (see guide for details). Also note that some of the 2016 ACS 1-Year annotation flags may include a decimal place (e.g., -8888888 to -8888888.0 or -8888888.00). This precision does not change the meaning of the annotation.

I use your package in my job literally every day, so thank you so much for all of your work on it!

@hrecht
Copy link
Owner

hrecht commented Sep 12, 2017

Hi @murray-cecile & @jcdepth - thanks for flagging. I won't be able to test until it's released, but please reply here with code if you run in to any issues. Since censusapi basically passes whatever you give it to the underlying API, the new endpoint should work.
It should look something like:
getCensus(name = "acs/acs1", vintage = 2016, ...)
I don't think there should be any issues with the annotation flags but we'll see on Thursday.

@hrecht
Copy link
Owner

hrecht commented Sep 12, 2017

This code from the 2015 1-year ACS works fine for me. They released the new "acs/acs1" endpoint for 2015 a little while ago. So hopefully 2016 should be fine too!

getCensus(name="acs/acs1", vintage=2015, vars=c("B01001_001E", "NAME"), region="state:*")

To get the name parameter for a given dataset, you can run

apis <- listCensusApis()

And look at the name column for your dataset of choice. Similarly, my understanding is that the new annotation fields are structured like other variables - so you'd enter something like B01001_001A in the vars list. (But please correct me if I'm misremembering.)

The decimal place change also shouldn't break anything.

@hrecht
Copy link
Owner

hrecht commented Sep 14, 2017

I've run a few basic tests and so far haven't run into any issues with the 2016 ACS. I'll leave this thread open for a little while in case anyone else does.
Here's an example getting total population and median household income estimate and margin of error, plus annotations. (Note there are no annotations for this one.)

dt <- getCensus(name = "acs/acs1", 
vintage = 2016, 
vars = c("B01001_001E", "B19013_001E", "B19013_001EA", "B19013_001M", "B19013_001MA", "NAME"), 
region = "state:*")
head(dt)

@murray-cecile
Copy link

As soon as I changed the endpoint, everything worked perfectly. Thanks again for creating this awesome package!

@hrecht
Copy link
Owner

hrecht commented Sep 25, 2017

Closing since no issues have been reported. If anyone runs in to bugs related to the 2016 ACS changes please open a new issue. Thanks all.

@hrecht hrecht closed this as completed Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants