acs.R version 1.2: Now, with 2012 data

Posted by Ezra Glenn on January 22, 2014
Census, Code, Self-promotion

As some of you have noticed, the new five-year Census ACS data has just come out, and is now available via the Census API. To make sure you are able to fetch the freshest possible data to play with in R, I’ve updated the acs.R package to version 1.2, which now includes full support for the 2008–2012 ACS data.

The latest version is now available on the CRAN repository. If you’ve already installed the package in the past, you can easily update with the update.packages() command; if you’ve never installed it, you can just as easily install it for the first time, by simply typing install.packages(“acs”). In either case, be sure to load the library after installing by typing library(acs), and install (or re-install) an API key with api.key.install() — see the documentation and the latest version of the acs user guide for more info.

To get the latest data, just continue to use the acs.fetch() function as usual, but specify endyear=2012. (By default, endyear is set to 2011 if no year is explicitly passed to acs.fetch, and I didn’t want to change this for fear of breaking existing user scripts. In the future, we might to rethink this, so that it selects the most recent endyear by default. Thoughts?)

(Note: If you’re not sure which version you are using, you can always type packageVersion(“acs”) to find out.)

Leave a Reply