Preflight census data
census_data_preflight(census.data, census.geo, year)A list indexed by two-letter state abbreviations,
which contains pre-saved Census geographic data.
Can be generated using get_census_data function.
An optional character vector specifying what level of
geography to use to merge in U.S. Census geographic data. Currently
"county", "tract", "block_group", "block", and "place"
are supported.
Note: sufficient information must be in user-defined voter.file object.
If census.geo = "county", then voter.file
must have column named county.
If census.geo = "tract", then voter.file
must have columns named county and tract.
And if census.geo = "block", then voter.file
must have columns named county, tract, and block.
If census.geo = "place", then voter.file
must have column named place.
If census.geo = "zcta", then voter.file must have column named zcta.
Specifying census.geo will call census_helper function
to merge Census geographic data at specified level of geography.
An optional character vector specifying the year of U.S. Census geographic
data to be downloaded. Use "2010", or "2020". Default is "2020".