get_acs()
and get_pums()
now default to
year = 2020
to retrieve data from the 2016-2020 5-year ACS.
2020 1-year data are not available in tidycensus and the package throws
an error message; users should hard-code a different year to get 1-year
ACS data.as_dot_density()
function allows users to quickly
generate dots from data for dot-density mapping. This function requires
the terra package to be installed.interpolate_pw()
function supports
population-weighted interpolation of data between incongruent
geometries, based on Esri’s weighted block centroid apportionment
algorithm. A common use-case will be interpolating pre-2020 data to 2020
geometries like Census tracts and block groups.get_pums()
now correctly returns vacant housing units
either when the VACS
variable is requested or when
return_vacant = TRUE
.get_acs()
now supports the ACS Comparison Profile data,
helping users perform longitudinal demographic analyses correctly.load_variables()
now returns a geography
column for the 5-year ACS Detailed Tables that tells users the smallest
geography at which any given variable is available.year = 2020
in a call to
get_decennial()
to access the data, and
load_variables(2020, "pl")
to look up variable IDs."voting district"
is now available for
2020 to assist with redistricting analyses.get_flows()
. Browse
the supporting documentation for information on how to analyze and
map migration flows data in tidycensus.shift_geo
argument is deprecated in favor of using
the new tigris::shift_geometry()
function. This allows for
shifting of geometries for any geography in national mapping
projects.get_pums()
. Updated variable definitions are found in the
data object pums_variables
.get_pums()
is updated to 2019.get_acs()
now
supports the state
parameter for zip code tabulation areas
(ZCTAs) to allow subsetting by state.NEWS.md
file to track changes to the
package.get_acs()
now defaults to year = 2019
,
meaning that 2015-2019 5-year estimates and 2019 1-year estimates are
retrieved if no year is specified.get_estimates()
now also defaults to
year = 2019
.get_decennial()
as the Census Bureau has restored its API
endpoint.geometry = TRUE
now works for all geographies currently
available in tidycensus.get_acs()
can now support the ACS Supplemental
Estimates API.get_acs()
now defaults to the 2014-2018 five-year
American Community Survey estimates, or the 2018 1-year estimates if
users set survey = "acs1"
.tidycensus now includes support for the Census Bureau Population Estimates API. Please see https://walkerke.github.io/tidycensus/articles/other-datasets.html for examples of how to use these new features.
Important internal changes to ensure that tidycensus continues to work with upcoming changes to Census API endpoints.
Several internal improvements and bug fixes. Please see the closed issues at https://github.com/walkerke/tidycensus/issues for a list.
Bug fixed that was causing GEOIDs for some states to be converted to NA on certain Linux platforms
A new parameter, shift_geo
, allows tidycensus users
to get US state and county geometry originally obtained with the
albersusa R package with Alaska and Hawaii shifted and
re-scaled for better cartographic display of the entire US.
library(tidycensus)
library(tidyverse)
library(viridis)
<- get_acs(geography = "county", variables = "B19013_001",
us_county_income 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()