get_acs_cvap: Obtain CVAP proportions by race

View source: R/get_acs-poststrat.R

get_acs_cvapR Documentation

Obtain CVAP proportions by race

Description

Returns the Citizen Voting Age Population by Congressional District. A custom call to get_acs_cces. In the output, cvap_total is the total CVAP of all races, cvap_race is the count of CVAP for the given race, and cvap_frac is the fraction.

Usage

get_acs_cvap(
  race = "white",
  varlab_df = ccesMRPprep::acscodes_df,
  year = 2018,
  states = NULL,
  dataset = "acs1"
)

Arguments

race

Race of interest. Either "white" (for non-Hispanic Whites), "hispanic", "black", "native" (for Native Americans including American Indians and Alaskan Natives), "asian".

varlab_df

a dataframe that appends the categories based on the varcode

year

The year of the ACS to get. Because of data availability limitations, this is capped to 2010-2018.

states

A vector of states to subset to. Gets passed onto the new state argument in tidycensus::get_acs(), which defaults to NULL.

dataset

Which type of ACS to get. Defaults to "acs1" for ACS-5 year. Use "acs5" for 5-year.

Details

Future versions will allow CVAP race fractions by geographies other than CD.

See Also

get_acs_cces

Examples

 get_acs_cvap("white")


kuriwaki/ccesMRPprep documentation built on July 27, 2023, 3:34 a.m.