label_decennial: Quickly add the labels of decennial variables

View source: R/label_census.R

label_decennialR Documentation

Quickly add the labels of decennial variables

Description

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

Usage

label_decennial(data, year = 2020, sumfile = "dhc", variable = variable)

Arguments

data

A data frame/tibble.

year

The year of decennial census data; defaults 2020.

sumfile

A string: which summary file to use. Defaults to "dhc", the code used for 2020. 2010 used summary files labeled "sf1" or "sf3".

variable

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

Value

A tibble

See Also

decennial_vars20


CT-Data-Haven/cwi documentation built on July 1, 2024, 7:45 a.m.