get_decennial_tract_county: Decennial Estimates by Tract and County

View source: R/get-decennial-recs.R

get_decennial_tract_countyR Documentation

Decennial Estimates by Tract and County

Description

Generate decennial estimates for multiple tables by multiple tracts and/or counties

Usage

get_decennial_tract_county(
  geography,
  counties = c("King", "Kitsap", "Pierce", "Snohomish"),
  table_codes,
  year,
  state = "WA"
)

Arguments

geography

A character string as either 'tract', 'county', 'msa', or 'place'.

counties

A character string or vector of counties. Defaults to PSRC counties.

table_codes

A character string or vector of Census table codes.

year

Numeric value. A decennial year equal or greater than 2010

state

A character string state abbreviation

Value

a tibble of decennial estimates by either tracts in a county/counties for selected table codes. Does not include variable names.

Author(s)

Christy Lam

Examples

Sys.getenv("CENSUS_API_KEY")
tbl_names <- paste0('PCT020', LETTERS[1:6])

get_decennial_tract_county(geography = 'county', table_codes = tbl_names, year = 2010)

get_decennial_tract_county(geography = 'county',
                           counties = c('King'),
                           table_codes = tbl_names[1],
                           year = 2010)

get_decennial_tract_county(geography = 'tract',
                           counties = c('Kitsap', 'Pierce'),
                           table_codes = tbl_names,
                           year = 2010)

get_decennial_tract_county(geography = 'tract',
                           counties = c('King'),
                           table_codes = tbl_names[1],
                           year = 2010)

cyyllam/mycensus documentation built on July 7, 2022, 8:40 p.m.