Site icon R-bloggers

Working with US Census Data in R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you need data about the American populace, there's no source more canonical than the US Census Bureau. The bureau publishes a wide range of public sets, and not just from the main Census conducted every 10 years: there are more than 100 additional surveys and programs published as well. To help R users access this rich source of data, Ari Lamstein and Logan Powell have published A Guide to Working with US Census Data in R, a publication of the R Consortium Census Working Group.

The guide provides an overview of the data available from the US census bureau and various tools available in R to access and analyze it. The guide notes that there are 22 R packages for working with census data, and cites as being particularly useful:

  • tigris, for working with shape files of census regions (census data is may be aggregated to any of a number of levels as shown int the diagram below)
  • acs, for downloading and managing data from the decennial census and the American Community Survey
  • choroplethr and choroplethrMaps, for mapping data (including census data) by region
  • tidycensus, to extract census data as tidy data frames
  • censusapi, for extracting data using the Census API
  • ipumsr, to extract US census data in a form that can be compared with data from other countries 
Standard Hierarchy of Census Geographic Entities, US Census Bureau.

You can find the complete guide at the link below.

R Consortium: A Guide to Working with US Census Data in R

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.