tidycensus

Build Status CRAN Badge CRAN Downloads

tidycensus is an R package that allows users to interface with the US Census Bureau’s decennial Census and five-year American Community APIs and return tidyverse-ready data frames, optionally with simple feature geometry included. Install from CRAN with the following command:

install.packages("tidycensus")

To learn more about the package, please visit the package documentation at https://walker-data.com/tidycensus.

Note: This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.

Update logs:

In version 0.10.2:

In version 0.9.9.2:

In version 0.9.5:

In version 0.8.1:

In version 0.4.6:

library(tidycensus)
library(tidyverse)
library(viridis)

us_county_income <- get_acs(geography = "county", variables = "B19013_001", 
                            shift_geo = TRUE, geometry = TRUE)

ggplot(us_county_income) + 
  geom_sf(aes(fill = estimate), color = NA) + 
  coord_sf(datum = NA) + 
  theme_minimal() + 
  scale_fill_viridis_c()
income_plot