Skip to content

Instantly share code, notes, and snippets.

@arvi1000
Created February 12, 2020 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvi1000/4ebbf96cc8761c195ffce0cf7e0a198b to your computer and use it in GitHub Desktop.
Save arvi1000/4ebbf96cc8761c195ffce0cf7e0a198b to your computer and use it in GitHub Desktop.
library(ggplot2)
library(data.table)
dat <- fread(
'name, delegates
"BUTTIGIEG", 22
"SANDERS", 21
"WARREN", 8
"KLOBUCHAR", 7
"BIDEN", 6
"Still\nremaining", 3915')
ggplot(dat, aes(fct_inorder(name), delegates, fill=name)) +
geom_col() +
geom_text(aes(label=scales::comma(delegates)),
vjust=-0.5, size=3) +
theme_classic(base_size = 14) +
theme(legend.position='false') +
labs(title='Delegate Distribution, after IA & NH',
x=NULL, y=NULL)
@arvi1000
Copy link
Author

arvi1000 commented Feb 12, 2020

image

https://twitter.com/arvi1000/status/1227645599266168832?s=20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment