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).

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

Value

A tibble with the selected and optionally renamed columns

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.

Examples

# \donttest{
pl_ex_path <- system.file('extdata/ri2018_2020Style.pl', package = 'PL94171')
pl <- pl_read(pl_ex_path)
pl <- pl_select_standard(pl)
# }