Description Usage Arguments Value
View source: R/precinct_processing_functions.R
This function can be used in situations present in some counties where precinct totals exist that you want to capture separately, like total ballots cast, total registered voters, etc. The function assumes the existence of a "precinct" column with the precinct names, and then asks you to provide the column name (quoted) with the total votes you want to capture. Additionally to match OpenElex formatting the category is listed as the "office": the third argument allows you to provide that value.
1 | convert_toplevel_totals(df, column_with_totals, office_text)
|
df |
dataframe with the precinct totals |
column_with_totals |
quoted name of target column containing the totals to capture (e.g. "total_reg_voters") |
office_text |
text to fill in the OpenElex office column as per the standard (e.g. "Registered Voters") |
formatted dataframe ready to match up with OpenElex column structure
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.