Description Usage Arguments Examples
View source: R/electoral_building.R
Electoral Building
1 | electoral_building(state_district, electoral_votes, perc_dem, perc_rep, source)
|
state_district |
state/district name |
electoral_votes |
number of electoral votes |
perc_dem |
percent democrats |
perc_rep |
percent republicans |
source |
polls or election results? |
1 2 3 4 5 6 7 8 9 10 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.