Clone your repo appex06-[github_name]
to create a new project in RStudio Cloud under the STA 199 class space.
Configure git
library(usethis)
use_git_config(user.name="your name", user.email="your email")
We’ll make use of the following packages.
library(tidyverse)
library(tidytext)
library(genius) # https://github.com/JosiahParry/genius
library(wordcloud)
library(reshape2)
Choose two albums of your choice, and read in their song lyric data from Genius. Add a variable for the artist and album, and don’t forget to save these data frames for later use.
Tidy up the lyrics by removing commonly used words. Display a table of the most commonly used words (after cleaning up the stop words). Are these words what you expect from the albums? Create a visualization of these words for each album.
Use the bing
lexicon to get the sentiments for the lyrics for each of your selected albums. You may need to interactively download this lexicon (I will demonstrate on the screen; dont forget to change eval
to be TRUE
in the chunk below). Create a visualization comparing positive vs. negative words for each album. What comparisons can be made?
get_sentiments("bing")
Create a wordcloud for each album.
genius
for scraping song lyrics using the Genius.com API. https://github.com/JosiahParry/genius