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.

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

Examples

 get_acs_cvap("white")
#> Getting data from the 2018 1-year ACS
#> The 1-year ACS provides data for geographies with populations of 65,000 and greater.
#> # A tibble: 436 × 6
#>     year cd    cvap_total race  cvap_race cvap_frac
#>    <dbl> <chr>      <dbl> <chr>     <dbl>     <dbl>
#>  1  2018 AK-01     532244 white    349058     0.656
#>  2  2018 AL-01     544464 white    370443     0.680
#>  3  2018 AL-02     516295 white    331192     0.641
#>  4  2018 AL-03     543854 white    381547     0.702
#>  5  2018 AL-04     515701 white    451856     0.876
#>  6  2018 AL-05     551968 white    420181     0.761
#>  7  2018 AL-06     535753 white    423727     0.791
#>  8  2018 AL-07     504177 white    175060     0.347
#>  9  2018 AR-01     548710 white    431129     0.786
#> 10  2018 AR-02     570220 white    413714     0.726
#> # … with 426 more rows