Skip to contents

Downloads processed CVAP data for a state. CVAP data is rounded to the nearest 5 so totals may not sum properly, but will be close.

Usage

cvap_get(
  state,
  year = 2020,
  geography = "block group",
  out_file = NULL,
  moe = FALSE,
  clean = TRUE
)

Arguments

state

character. The state to get data for or nation for the nation file.

year

numeric. Year for the data in 2009 to 2020.

geography

character. Level of geography. Default is 'block group'. See Details.

out_file

file to save downloaded rds to

moe

Include margin of error? Default is FALSE.

clean

Should variable names be standardized? Default is TRUE.

Value

tibble of data

Details

Geography options are

  • 'block group': block group level data

  • 'cd': congressional district data (years 2016+)

  • 'county': county-level data

  • 'place': place-level data

  • shd': state house district data (years 2016+)

  • 'ssd': state senate district data (years 2016+)

  • 'state': state-level data

  • 'tract': tract-level data

  • 'nation': nation-wide data

Examples

cvap_get('DE')
#> # A tibble: 706 × 10
#>    GEOID     cvap cvap_white cvap_black cvap_hisp cvap_asian cvap_aian cvap_nhpi
#>    <chr>    <dbl>      <dbl>      <dbl>     <dbl>      <dbl>     <dbl>     <dbl>
#>  1 1000104…  1145       1025         95         4         10         0         0
#>  2 1000104…  1780       1525        185         0         30        40         0
#>  3 1000104…  1360       1195         25         0         50         0         0
#>  4 1000104…   970        830         90        20         30         0         0
#>  5 1000104…  1870       1255        405       115         65        10         0
#>  6 1000104…   640        405        205        25          0         0         0
#>  7 1000104…   880        535        315        15          0         4         0
#>  8 1000104…  1135        870        180        85          0         0         0
#>  9 1000104…  1070        530        435        75          0         0         0
#> 10 1000104…  1475        550        860        65          0         0         0
#> # … with 696 more rows, and 2 more variables: cvap_two <dbl>, cvap_other <dbl>