knitr::opts_chunk$set( echo = TRUE, warning = FALSE, message = FALSE, collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
Tools for working with the Genius (FKA Rap Genius) API.
Get the latest stable version from CRAN...
install.packages("geniusr")
...or install the development version from Github (recommended).
remotes::install_github("ewenme/geniusr")
GENIUS_API_TOKEN
by calling the genius_token()
function and entering your Genius Client Access Token when prompted.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()
citation(package = 'geniusr')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.