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

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…  1185       1085         25        50         15         0         0
#>  2 1000104…  1725       1370        290        10         30        25         0
#>  3 1000104…  1315       1180         25         0         40         0         0
#>  4 1000104…   995        805         85        75         25         0         0
#>  5 1000104…  1975       1395        455        80         30         0         0
#>  6 1000104…   645        410        230         0          0         0         0
#>  7 1000104…   900        555        320         0          4         4         0
#>  8 1000104…   900        630        210        65          0         0         0
#>  9 1000104…   935        600        210        80         25         0         0
#> 10 1000104…  2080        545       1265       265          0         0         0
#> # ℹ 696 more rows
#> # ℹ 2 more variables: cvap_two <dbl>, cvap_other <dbl>