Skip to content

Instantly share code, notes, and snippets.

@wesslen
Created August 8, 2018 12:02
Show Gist options
  • Select an option

  • Save wesslen/b92dd914e44e9680914334bcf0a178ec to your computer and use it in GitHub Desktop.

Select an option

Save wesslen/b92dd914e44e9680914334bcf0a178ec to your computer and use it in GitHub Desktop.
thom tillis tweets
library(tidyverse); library(rtweet)
get_timeline(c("senthomtillis","thomtillis"), n = 3200) %>%
mutate(keyword = grepl("bipartisan", text, ignore.case = TRUE)) %>%
filter(keyword) %>%
group_by(screen_name) %>%
ts_plot("3 months", trim = 1L) +
labs(x= "Date", y= NULL, title = "Thom Tillis' Tweets mentioning `bipartisan*` by Twitter account") +
theme(text = element_text(size = 12),
legend.position = c(0.3,0.5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment