Skip to content

Instantly share code, notes, and snippets.

@romainfrancois
Created December 26, 2017 17:21
Show Gist options
  • Save romainfrancois/e472eca3f5ed0154f310be1170626a19 to your computer and use it in GitHub Desktop.
Save romainfrancois/e472eca3f5ed0154f310be1170626a19 to your computer and use it in GitHub Desktop.
library(rtweet)
library(tidyverse)
tweets <- get_timeline("romain_francois", n = 5000)
tweets %>%
pull(text) %>%
str_extract_all(emo::ji_rx) %>%
flatten_chr() %>%
table() %>%
enframe(name = "emoji") %>%
left_join( emo::jis, by = "emoji" ) %>%
select( emoji, name, value) %>%
arrange( desc(value) ) %$%
{ writeLines(glue("{emoji} ({name}) - {value} times")) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment