Tools for working with the Genius (FKA Rap Genius) API.
Get the latest stable version from CRAN…
…or install the development version from Github.
Start with the basics!
library(geniusr) library(dplyr) library(tidytext) # get lyrics get_lyrics_search(artist_name = "Kanye West", song_title = "Good Morning") %>% # get lyric bigrams unnest_tokens(bigram, line, token = "ngrams", n = 2) %>% # look for good morning filter(bigram == "good morning") %>% # count bigram frequency nrow() #>  18