pl_select_standard: Select the Standard Redistricting Columns

View source: R/pl_select_standard.R

pl_select_standardR Documentation

Select the Standard Redistricting Columns

Description

Selects the standard set of basic population groups and VAP groups. Optionally renames them from the PXXXYYYY naming convention (where XXX is the table and YYYY is the variable) to more human readable names. pop_* is the total population, from tables 1 and 2, while vap_* is the 18+ population (voting age population).

Usage

pl_select_standard(pl, clean_names = TRUE)

Arguments

pl

A list of PL tables, as read in by pl_read()

clean_names

whether to clean names

Details

If clean names=TRUE, then the variables extracted are as follows:

  • \*_hisp: Hispanic or Latino (of any race)

  • \*_white: White alone, not Hispanic or Latino

  • \*_black: Black or African American alone, not Hispanic or Latino

  • \*_aian: American Indian and Alaska Native alone, not Hispanic or Latino

  • \*_asian: Asian alone, not Hispanic or Latino

  • \*_nhpi: Native Hawaiian and Other Pacific Islander alone, not Hispanic or Latino

  • \*_other: Some Other Race alone, not Hispanic or Latino

  • \*_two: Population of two or more races, not Hispanic or Latino

where \* is pop or vap.

Value

A tibble with the selected and optionally renamed columns

Examples


pl_ex_path <- system.file('extdata/ri2018_2020Style.pl', package = 'PL94171')
pl <- pl_read(pl_ex_path)
pl <- pl_select_standard(pl)


PL94171 documentation built on Sept. 12, 2022, 1:06 a.m.