Description Usage Arguments Examples
Fill scale for binned gradient between two parties
1 |
... |
passed on to scale_*_gradient2 |
1 2 3 4 5 | library(dplyr)
electoral_votes_2016 %>%
mutate(diff = perc_rep - perc_dem, party = ifelse(perc_dem > perc_rep, "Dem", "Rep")) %>%
ggsnake(order = diff, fill = diff, label = state_district, color = party, size = electoral_votes) +
scale_fill_party_binned() + scale_color_party()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.