Skip to content

Instantly share code, notes, and snippets.

@javierluraschi
Created December 11, 2019 01:57
Show Gist options
  • Save javierluraschi/f7dad933a8771a1d6c97eeaeedf2d7d0 to your computer and use it in GitHub Desktop.
Save javierluraschi/f7dad933a8771a1d6c97eeaeedf2d7d0 to your computer and use it in GitHub Desktop.
Karpathy's Tweets per Month
library(tidyverse)
rtweet::get_timeline(rtweet::as_userid("karpathy"), n = 1000) %>%
mutate(year = as.character(lubridate::year(as.Date(created_at))),
month = lubridate::month(as.Date(created_at))) %>%
group_by(year, month) %>%
count(year, month) %>%
ggplot(aes(month, n, color = year)) + geom_point() +
geom_smooth(method = "lm", alpha = .15, aes(fill = year)) +
ggtitle("Karpathy's Tweets per Month")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment