View source: R/ei_descriptives.R
plot_bivariate | R Documentation |
Plot bivariate relationships between all combinations of candidates and race/ethnicities
plot_bivariate(
data,
cand_cols,
race_cols,
corrs = FALSE,
save = FALSE,
path = NULL
)
data |
A data.frame() object containing precinct-level turnout data by race and candidate |
cand_cols |
A character vector listing the column names for turnout for each candidate |
race_cols |
A character vector listing the column names for turnout by race |
corrs |
A boolean indicating whether to include correlation coefficients on the plot. |
save |
A boolean indicating whether to save the plot to a file. |
path |
A string to specify plot save location. If NULL, plot is not saved. |
ggplot object with bivariate plots faceted by candidate and race
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.