Electoral Building

electoral_building(state_district, electoral_votes, perc_dem, perc_rep, source)

Arguments

state_district

state/district name

electoral_votes

number of electoral votes

perc_dem

percent democrats

perc_rep

percent republicans

source

polls or election results?

Examples

library(ggplot2) electoral_building(state_district = electoral_votes_2016$state_district, electoral_votes = electoral_votes_2016$electoral_votes, perc_dem = electoral_votes_2016$perc_dem, perc_rep = electoral_votes_2016$perc_rep, source = "election" ) + scale_color_party("Party") + scale_fill_party("Party") + theme(legend.position = "bottom")