add_precinct | R Documentation |
Use the non-equi join in data.table to identify precinct. row i is in precinct j if i's ID is in between p_start_id and p_end_id of precint j.
add_precinct(votes, pkey)
votes |
EL155 dataset of votes, product of read_EL155() |
pkey |
precinct key, product of get_precinct_range() |
data(G2016_Dillon_EL155)
dillon_p <- get_precinct(G2016_Dillon_EL155)
wprecinct <- add_precinct(G2016_Dillon_EL155, dillon_p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.