build_acs {censable}R Documentation

Build Data from the Decennial Census

Description

Creates a dataset, using the decennial census information, with the standard variables used for redistricting. Creates a stable base for getting data from censusapi for common calls in redistricting.

#' # Output columns are:

Arguments for geography are not checked, so will error if invalid. This is by design to avoid blocking usage that could become valid.

Currently valid options for geography:

Usage

build_acs(
  geography,
  state,
  county = NULL,
  geometry = TRUE,
  year = 2020,
  survey = "acs5",
  groups = "all"
)

mem_build_acs(
  geography,
  state,
  county = NULL,
  geometry = TRUE,
  year = 2020,
  survey = "acs5",
  groups = "all"
)

Arguments

geography

Required. The geography level to use.

state

Required. Two letter state postal code.

county

Optional. Name of county. If not provided, returns blocks for the entire state.

geometry

Defaults to TRUE. Whether to return the geometry or not.

year

year, must be 2000, 2010, or 2020 (after August 2021)

survey

whether the get estimates from the 5-year ('acs5'), 3-year ('acs3'), or 1-year ('acs1') survey. Default is 'acs5'.

groups

defaults to 'all', which gets pop and vap. If 'pop', only gets pop. If 'vap', only gets vap. Any other strings default to 'all'.

Value

tibble with observations for each observation of the geography in the state or county. Data includes up to 3 sets of columns for each race or ethnicity category: population (pop), voting age population (vap), and citizen voting age population (cvap)

Examples

## Not run: 
# uses the Census API
tb <- build_acs(geography = 'tract', state = 'NY', county = 'Rockland', geometry = TRUE)

## End(Not run)

[Package censable version 0.0.5 Index]