label_acs: Quickly add the labels of ACS variables

View source: R/label_census.R

label_acsR Documentation

Quickly add the labels of ACS variables

Description

tidycensus::get_acs returns an ACS table with its variable codes, which can be joined with ⁠cwi::acs_vars*⁠ to get readable labels. This function is just a quick wrapper around the common task of joining these two data frames.

Usage

label_acs(data, year = 2022, survey = "acs5", variable = variable)

Arguments

data

A data frame/tibble.

year

The endyear of ACS data; defaults 2022.

survey

A string: which ACS estimate to use. Defaults to 5-year ("acs5"), but can also be 1-year ("acs1") or 3-year ("acs3"), though both 1-year and 3-year have limited availability.

variable

The bare column name of variable codes; defaults to variable, as returned by tidycensus::get_acs.

Value

A tibble

See Also

acs_vars22


CT-Data-Haven/cwi documentation built on May 11, 2024, 5:25 p.m.