tidycensus is an R package that allows users to interface with a select number of the US Census Bureau's data APIs and return tidyverse-ready data frames, optionally with simple feature geometry included. Install from CRAN with the following command:
install.packages("tidycensus")
tidycensus is designed to help R users get Census data that is pre-prepared for exploration within the tidyverse, and optionally spatially with sf. To learn more about how the package works, plase read through the following articles:
- Basic usage of tidycensus
- Spatial data in tidycensus
- Margins of error in the ACS
- Other Census Bureau datasets
- Working with Census microdata
If you'd like to go further with tidycensus, be sure to check out the following resources:
- Check out live and recorded workshops from Walker Data which include custom, step-by-step tidycensus tutorials;
- Read the book Analyzing US Census Data: Methods, Maps, and Models in R, published in February 2023;
- Subscribe to the Walker Data email list below:
While tidycensus focuses on a select number of US Census Bureau datasets, there are many others available via the Census Bureau API. For access to all of these APIs, please check out Hannah Recht's excellent censusapi package.
If you find tidycensus useful in your work and would like to ensure continued development of the package, you can provide support in the following ways:
- Chip in some funds to support package development via PayPal;
- Set up a consulting engagement or workshop though Walker Data to help you implement tidycensus in your project. Send a note to [email protected] if you are interested;
- File an issue - or even better, a pull request - at https://github.com/walkerke/tidycensus/issues.
Note: This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.