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 = 2022,
  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 2022.

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…  1070        940         15        90         20         0         0
#>  2 1000104…  1710       1475        215        15          0         4         0
#>  3 1000104…  1460       1335         45         0         30         0         0
#>  4 1000104…   940        735        115        70         20         0         0
#>  5 1000104…  1955       1395        395       100         30         0         0
#>  6 1000104…   635        455        170        10          0         0         0
#>  7 1000104…  1090        555        400         0          4         4         0
#>  8 1000104…   970        695        210        65          0         0         0
#>  9 1000104…  1110        480        335       270         20         0         0
#> 10 1000104…  1940        810        935       195          0         0         0
#> # ℹ 696 more rows
#> # ℹ 2 more variables: cvap_two <dbl>, cvap_other <dbl>