Skip to content

Instantly share code, notes, and snippets.

@underthecurve
Created February 14, 2020 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save underthecurve/76e56f01a93c00676447ab0d4d90ec3a to your computer and use it in GitHub Desktop.
Save underthecurve/76e56f01a93c00676447ab0d4d90ec3a to your computer and use it in GitHub Desktop.
lightning talks graphic
library('tidyverse')
talks.10.18 <- read_csv(url("https://raw.githubusercontent.com/underthecurve/lightning-talks-analysis/master/lightningtalks_clean.csv"))
talks.10.18.grouped <- talks.10.18 %>%
group_by(year) %>%
summarise(n = n())
talks.10.19.grouped <- talks.10.18.grouped %>%
add_row(year = 2019,
n = 43) %>% # per Sandhya Kambhampati
add_row(year = 2020,
n = 60)
ggplot(talks.10.19.grouped, aes(x = year, y = n)) +
geom_line(color = 'darkred', size = 2) +
geom_point(color = 'darkred', size = 5) +
theme_minimal() +
labs(x = '',
y = '') +
theme(axis.text = element_text(size=20),
axis.ticks.x = element_line(),
axis.ticks.length.x = unit(0.2, "cm"),
axis.line.x = element_line(),
panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank()) +
scale_x_continuous(breaks = seq(2010, 2020, 1),
limits = c(2010, 2020),
labels = c("2010", "'11", "'12", "'13", "'14", "'15", "'16", "'17", "'18", "'19", "'20")) +
scale_y_continuous(limits = c(0, 70),
expand = c(0, 0))
ggsave('plot.png', width = 10, height = 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment