rpv_coef_plot {eiExpand}R Documentation

Racially Polarized Voting Analysis (RPV) Coefficient Plot

Description

Creates a coefficient plot showing of RPV results estimate ranges of all contests by voter race

Usage

rpv_coef_plot(
  rpvDF = NULL,
  title = "Racially Polarized Voting Analysis Estimates",
  caption = "Data: eiCompare RPV estimates",
  ylab = NULL,
  colors = NULL,
  race_order = NULL
)

Arguments

rpvDF

A data.frame containing RPV results

title

The plot title

caption

The plot caption

ylab

Label along y axis

colors

Character vector of colors, one for each racial group. The order of colors will be respective to the order of racial groups.

race_order

Character vector of racial groups from the voter_race column of rpvDF in the order they should appear in the plot. If not specified, the race groups will appear in alphabetical order.

Value

Coefficient plot of RPV analysis as a ggplot2 object

Author(s)

Rachel Carroll <rachelcarroll4@gmail.com>

Stephen El-Khatib <stevekhatib@gmail.com>

Loren Collingwood <lcollingwood@unm.edu>

Examples

library(eiExpand)
data(example_rpvDF)

dem_rpv_results <- example_rpvDF %>% dplyr::filter(Party == "Democratic")
rpv_coef_plot(dem_rpv_results)

[Package eiExpand version 1.0.5 Index]