View source: R/voter_file_utils.R
merge_voter_file_to_shape | R Documentation |
This is achieved by determining the units (e.g., Census block, district, etc.) for which each voter's address lies within.
merge_voter_file_to_shape(
voter_file,
shape_file,
crs = NULL,
coords = c("lon", "lat"),
voter_id = "voter_id"
)
voter_file |
A dataframe denoting the voter file. If it is not a geometry dataframe, it will be converted to one. |
shape_file |
The shapefile for the region, as an sf object. |
crs |
The PROJ4 string or int for the coordinate reference system. |
coords |
The columns, as a list, that refer to the longitude and latitude. |
voter_id |
The column for the Voter ID. |
This function assumes that the sf package was used to read in the shape files.
The voter file with unit information attached.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.