An official website of the United States government
Here’s how you know
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS
A lock (
) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
The U.S. Census Bureau releases tabulations based on the decennial census to the public in multiple formats. Data provided on the Census Bureau website may be especially useful to researchers in secure computing environments where network access is restricted. However, users may find the format of this data difficult to use compared to other formats such as the website https://data.census.gov. This paper provides a tutorial for experienced R users to consume census data from the website, specifically focusing on summary File SF2 from the 2010 decennial census. We introduce the sfreader package which provides utility functions and helper tables to facilitate use of the data. Examples demonstrate the organization of tables, geographies, and races among the 2010 SF2 files. Use of sfreader and widely adopted R packages such as tidyverse and sf (“Simple Features”) is demonstrated to navigate and process the data.
Share
Some content on this site is available in several different electronic formats. Some of the files may require a plug-in or additional software to view.
Top