For my project I will be looking into Drake’s discography and analyzing his music to further explore his quick rise to fame and how his sound followed his popularity. I began this project by choosing to focus on albums released by Drake which are considered to be studio albums (according to Wikipedia) as opposed to compilation albums or mix-tapes so I can more accurately analyze Drake’s emotional shifts throughout his years of participation in the hip hop and rap industry. I am looking specifically at “Certified Lover Boy” (2021) “Thank Me Later” (2010), “Take Care” (2011), “Scorpion” (2018),“Views” (2016) and “Nothing Was The Same” (2013)
library(spotifyr)
library(ggridges)
library(tidyverse)
library(spotifyr)
library(tidytext)
library(textdata)
library(ggjoy)
library(knitr)
library(genius)
library(ggthemes)
library(wordcloud2)
I got data on Drake:
Sys.setenv(SPOTIFY_CLIENT_ID = 'e841f4311ad24662b7920f3c24d17e6c')
Sys.setenv(SPOTIFY_CLIENT_SECRET = '281c6124796644f5af910e88774156c3')
access_token <- get_spotify_access_token()
get_artist_audio_features("Drake") -> drake
library(readr)
drake_lyrics <- read_csv("Desktop/MEA3290/drake_data.csv")
drake_lyrics %>%
unnest_tokens(word,lyrics) -> drake_words
## Warning: One or more parsing issues, see `problems()` for details
drake_words %>%
anti_join(stop_words) %>%
count(word, sort = TRUE)
## # A tibble: 8,223 × 2
## word n
## <chr> <int>
## 1 yeah 1198
## 2 drake 740
## 3 verse 612
## 4 shit 609
## 5 chorus 592
## 6 love 550
## 7 girl 485
## 8 niggas 410
## 9 time 408
## 10 nigga 400
## # … with 8,213 more rows
I gathered all of my lyrics from Kaggle.com as GENIUS API is down. However, all albums and lyrics were downloaded from Genius according to the kaggle description. The link for this data is https://www.kaggle.com/juicobowley/drake-lyrics and from here I was able to see all of his albums, mix-tapes and singles with all lyrics attached. From there, I went to Wikipedia where I selected to analyze his 6 studio albums. https://en.wikipedia.org/wiki/Drake_discography . I loaded in the spotify API and gathered data from the spotify developers portal. I unnested the tokens in order to easily view the individual lyrics that Drake uses in his songs, and I applied this to my visualizations.
I predict that over time Drake’s music will decrease in positivity because of the toll I believe fame and rumors have had on his overall well-being. There have been rumors circulating about his inappropriate relations with child actress, Milly Bobby Brown and I believe these rumors in addition to others that could have negatively impacted his mental health, thus impacting his ability to produce upbeat and happy music.
The layout of my project is as follows: After downloading the albums and lyrics from Kaggle, I filtered out the six albums I wanted to look analyze. I then created a word cloud for all of his lyrics in these 6 albums while excluding words that were included in the titles, including “drake”, “intro” “verse” and “chorus”. Afterwords I created a bar chart to see the average valence of each studio album to determine the overall positivity of each album. Next, I created a word cloud to see what words Drake uses the most, and afterwards I calculated a mean valence chart and a mean danceability chart. I filtered out all of the albums of Drake’s which I was not interested in using and then used the Afinn lexicon to assign the words in each album with a “score” which indicates how positive or negative an album based on a numerical value (-5 being the lowest and 5 being the highest)
drake %>%
filter(album_name %in% c("Certified Lover Boy","Thank Me Later", "Take Care", "Scorpion", "Views", "Nothing Was The Same")) -> drake_albums
I created a word cloud of Drake’s overall most used words in the 6 studio albums to represent what lyrics he uses the most. I was having trouble classifying these words with a particular emotion. The largest word displayed is “Yeah” which could possibly carry a positive meaning, but it’s still hard to decipher. I decided to run more code to show valence and sentiments in attempt to see the emotion and overall mood of Drake’s six studio albums.
drake_words %>%
unnest_tokens(word, word) %>%
anti_join(stop_words) %>%
count(word, sort = TRUE) %>%
filter(!word %in% c("drake", "verse", "chorus", "intro")) %>%
wordcloud2()
## Joining, by = "word"
For the six studio albums I am analyzing, I ran an average valence test in chronological order to see the overall data configured opinion of how positive each album is. His first studio album “Thank Me Later” debuted in June of 2010 and has the highest valence. Drake was not yet on the radar of many listeners. The studio albums which released after, “Take Care” and “Nothing Was The Same” had a steady decline in valence. After the release of these albums however, there is an incline in valence signifying that his ability to handle pressure has most likely improved over his career in the music industry.
drake_albums %>%
group_by(album_name)%>%
mutate(average = mean(valence)) %>%
ggplot(aes(reorder(album_name, as.Date(album_release_date)),valence)) + geom_col()
Here is a density chart to show the mean valence throughout each studio album going in chronological order from bottom to top.
drake_albums %>%
ggplot(aes(valence, reorder(album_name, as.Date(album_release_date)), fill = ..x..)) +
geom_density_ridges_gradient() +
theme_fivethirtyeight() +
xlim(0,1) +
theme(legend.position = "none") +
ggtitle("Valence of Drake's Albums")
## Picking joint bandwidth of 0.0759
A numerical chart of the mean valence for each studio album.
drake_albums %>%
group_by(album_name) %>%
summarise(mean(valence)) %>%
arrange(desc(`mean(valence)`))
## # A tibble: 6 × 2
## album_name `mean(valence)`
## <chr> <dbl>
## 1 Thank Me Later 0.468
## 2 Take Care 0.373
## 3 Nothing Was The Same 0.348
## 4 Certified Lover Boy 0.347
## 5 Scorpion 0.320
## 6 Views 0.274
Mean Danceabilty is a way of gathering data to determine how easily a song can be danced to. I ran an analysis to determine numerically which songs are the most groovy.His earlier albums and his most recent album are on the lower end of the spectrum while 2016 “Views” 2018 “Scorpion” and 2013 “Nothing Was The Same”.
drake %>%
group_by(album_name) %>%
summarise(mean(danceability)) %>%
arrange(desc(`mean(danceability)`)) %>%
filter(!album_name %in% c("What A Time To Be Alive", "More Life", "Dark Lane Demo Tapes", "If You're Reading This It's Too Late", "Nothing Was The Same (Deluxe)", "So Far Gone", "Care Package", "Thank Me Later", "Take Care (Deluxe)", "Thank Me Later (Int'l Version", "Take Care (Explicit Deluxe)"))
## # A tibble: 6 × 2
## album_name `mean(danceability)`
## <chr> <dbl>
## 1 Scorpion 0.705
## 2 Views 0.674
## 3 Nothing Was The Same 0.673
## 4 Certified Lover Boy 0.633
## 5 Take Care 0.539
## 6 Thank Me Later (Int'l Version) 0.524
colnames(drake_lyrics)[4] <- "word"
Sentiment is a more in depth analysis of emotions displayed in text describing feelings like anger, anticipation, disgust, fear, joy, negative, positive, sadness, surprise and trust. I un-nest the tokens and create a data set for the sentiment analysis so it is easily accessible.
sentiment <- drake_words %>%
unnest_tokens(word, word) %>%
anti_join(stop_words) %>%
count(word, sort = TRUE) %>%
filter(!word %in% c("drake", "verse", "chorus")) %>%
inner_join(get_sentiments("afinn"))
## Joining, by = "word"
## Joining, by = "word"
sentiment <- drake_lyrics %>%
unnest_tokens(word, word, token = "regex") %>%
filter(album %in% c("Scorpion", "Take Care", "Nothing Was the Same", "Certified Lover Boy", "Views", "Thank Me Later")) %>%
anti_join(stop_words) %>%
filter(!word %in% c("drake", "verse", "chorus")) %>%
inner_join(get_sentiments("nrc")) %>%
group_by(album) %>%
count(word, sentiment, sort = TRUE) %>%
group_by(album,sentiment) %>%
summarise(frequency = sum(n))
sentiment %>%
mutate(sentiment = reorder_within(sentiment, frequency, album)) %>%
ggplot(aes(sentiment, frequency, fill = factor(sentiment))) +
geom_col(show.legend = FALSE) +
facet_wrap(~ album, scales = "free") +
coord_flip() +
scale_x_reordered()
quickplot(sentiment, data=sentiment, weight=frequency, geom="bar", fill=sentiment, ylab="count")+
ggtitle("Sentiments")
Here I am going to look at 3 specific albums, “Take Care” (2011), “Views” (2016), and “Certified Lover Boy” (2021). I selected each of these albums because they’re each five years apart, so these graphs will express how his sentiment changes throughout these time intervals.
sentiment_TakeCare <- subset(sentiment, album == "Take Care")
quickplot(sentiment, data=sentiment_TakeCare, weight=frequency, geom="bar", fill=sentiment, ylab="count")+
ggtitle("Sentiments from Take Care")
In “Take Care” it is mostly equal in sentiment in terms of positive and negative so overall it is safe to say this is a relatively balanced album in terms of emotions. Anger and trust are also trailing behind the positive and negative sentiments, and also about equal. This was early in Drakes career so pressure levels were probably higher than they were later in his career, making this a highly emotional album.
sentiment_Views <- subset(sentiment, album == "Views")
quickplot(sentiment, data=sentiment_Views, weight=frequency, geom="bar", fill=sentiment, ylab="count")+
ggtitle("Sentiments from Views")
Views was released in 2016 and he proceeded to go on a massive tour around the world after the release this album. In terms of sentiment, it’s not as sad as I would’ve expected but there are a lot of tracks on this album that are easy to dance to. This album was the one that ultimately got Drake out of his rutt after “Nothing Was The Same”, and he is clearly determined to make his music more positive.
sentiment_CertifiedLoverBoy <- subset(sentiment, album == "Certified Lover Boy")
quickplot(sentiment, data=sentiment_CertifiedLoverBoy, weight=frequency, geom="bar", fill=sentiment, ylab="count")+
ggtitle("Sentiments from Certified Lover Boy")
Certified Lover Boy is Drake’s most recent studio album, and it is low on sentiments overall. He has a relatively high “positive” sentiment with “negative” once again trailing behind. This isn’t a very emotionally charged album, yet so far it’s been very successful.
In conclusion, based on the data provided I do believe that Drake had a sharp mental health decline in the middle of his rap career because of the dip in average “sentiment” during “Nothing Was The Same” (2013). Though we are only analyzing studio albums, this album were released in the early-middle of Drake’s career. Where my hypothesis was wrong however, is that I don’t believe he’s struggling or depressed anymore (based on his music). After the dip in average valence (the very bottom being “Nothing Was The Same”), his average valence only seems to increase suggesting that he’s gotten used to dealing with fame, and he can focus on making his music as positive as possible for his listeners.