This final project will explore Michael Jackson’s discography.

I will be looking at how Michael Jackson’s “pop” sound changed over the course of his six studio albums. Jackson’s sound becomes much more somber and less upbeat as his career progresses due to outside forces in his life. I will be looking at his six main albums “Off The Wall” (1979), “Thriller” (1982), “Bad” (1987), “Dangerous” (1991), “HIStory: Past, Present and Future: Book I” (1995), and “Invincible” (2001). I chose only to look at these works because these six albums were completely solo projects without Jackson 5 features. I will be looking at them with the help of Wikipedia and Spotify. I would like to note that Spotify does not have “Bad” or “HIStory: Past, Present and Future: Book I” on it’s platform so I will be doing my work based on my Genius information. Using all six albums in my analysis can be useful to show how his music changes as his scandals, and other outside forces take over Jackson’s life. I will also look at the energy and danceability rates of each album to see if there is significant change in these rates from 1979 to 2001. I will be using both the Genius API and Spotify API to get my necessary information.

Note: When I was working on this project, the Genius API was not working. I will provide the necessary information I gathered from the API.

First I download the necessary packages:

library(tidyverse)
library(tidytext)
library(textdata)
library(genius)
library(tibble)
library(knitr)
library(dplyr)
library(devtools)
library(wordcloud2)
library(spotifyr)
devtools::install_github('Lchiffon/wordcloud2')

Here I am going to look at each album!

Off The Wall (1979)

Downloading the album from Genius:

genius_album(artist= "Michael Jackson", album= "Off the Wall")->OffTheWall

Lets look at the word count and the 15 most popular words on the album:

OffTheWall %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1    10
OffTheWall %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  filter(!word %in% c("tahm", "igh")) %>% 
  head(10) %>%
  knitr::kable()
word n
NA 10

Word Count: 3261 Words

OffTheWall %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  inner_join(get_sentiments("bing")) %>% 
  inner_join(get_sentiments("afinn")) %>% 
  filter(!word %in% c("tahm", "igh")) -> OTWsentiment

Of the most popular words, “stop” is the most popular word thanks to the song “Don’t Stop Till You Get Enough”, but “love” is the second most popular word which is not shocking! He always sings about wooing women and being in love on his first album with Epic. Looking at this list in full, I see the words “night”, “fallin”, and “dance” which fits his history being popular in clubs, as his music was great for dancing! This album is most notably known for being very a huge breakthrough in music history and was a “landmark for the disco era” according to Wikipedia https://en.wikipedia.org/wiki/Off_the_Wall.

“Fun” has a sentiment of 4 which is a value I have not seen before which means it carries a lot of positive feeling! “Love” has a sentiment of 3, which does not shock me… we will see a pattern of this throughout all six albums. Overall, this seems to be much more negative sentiment which is surprising because this album is very upbeat and funky, reflective of the entrance into the 80s groove scene that Jackson was immersed in.

Lets download the album from the Spotify API

Sys.setenv(SPOTIFY_CLIENT_ID = 'c55f8374fa7047adb316efe068264c30')
Sys.setenv(SPOTIFY_CLIENT_SECRET = '365b55c61bcc4dedae9a1411563ac976')
??get_spotify_access_token()
access_token <- get_spotify_access_token()

Michael_Jackson <- get_artist_audio_features('michael jackson')
Michael_Jackson %>%
  filter(album_name %in% "Off the Wall")-> OTWalbum
Michael_Jackson %>% 
  filter(album_name %in% "Off the Wall") %>% 
  select(danceability, album_name, energy, track_name) %>% 
  kable()
danceability album_name energy track_name
0.878 Off the Wall 0.8210 Don’t Stop ’Til You Get Enough
0.808 Off the Wall 0.5350 Rock with You - Single Version
0.907 Off the Wall 0.8750 Workin’ Day and Night
0.809 Off the Wall 0.8920 Get on the Floor
0.827 Off the Wall 0.5950 Off the Wall
0.883 Off the Wall 0.4000 Girlfriend
0.293 Off the Wall 0.0348 She’s Out of My Life - Single Version
0.684 Off the Wall 0.3940 I Can’t Help It
0.794 Off the Wall 0.5510 It’s the Falling in Love
0.847 Off the Wall 0.7090 Burn This Disco Out

The danceability on this album is very high for every song but the slowest song on the album, “She’s Out of My Life”. This is overall very good and reflects the groove and funk that Jackson was known for as the 80s began. The danceability is interesting given that there is a lot of negative sentiment words on the album, but this could also come from the fact that “stop” is the most popular word on the album and “Don’t Stop ’Til You Get Enough” uses that word frequently. Overall, this album starts Jackson’s solo career on a high!

OTWalbum %>%
  arrange(desc(danceability))%>%
  ggplot(aes(track_name, danceability, fill= track_name)) + geom_col() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

Thriller (1982)

genius_album(artist= "Michael Jackson", album= "Thriller")->Thriller

Lets look at the word count and 15 most popular songs on Thriller.

Thriller %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1     9
Thriller %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()
word n
NA 9

Word Count: 3517 words “Ma” is the most popular word by a long shot, most likely coming from “Wanna Be Startin’ Somethin’, but”ma" is more of a sound than a word in my opinion, so with that aside, “yeah”, “mine”, and “girl” are some of the most popular songs…again. This not much of a shock as he is always singing about a girl he wants to be his! This album is a bit more dark for Jackson’s career though. According to Wikipedia https://en.wikipedia.org/wiki/Thriller_(album), “with the ongoing backlash against disco, Jackson moved in a new musical direction, incorporating pop, post-disco, rock and funk. Thriller foreshadows the contradictory themes of Jackson’s personal life, as he began using a motif of paranoia and darker themes.”

Thriller %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  inner_join(get_sentiments("bing")) %>% 
  inner_join(get_sentiments("afinn")) %>% 
  filter(!word %in% c("tahm", "igh")) -> Thrillersentiment

“Love” has a sentiment of 3 and is seen 33 times within the album! It carries a lot of positive feeling, but again I am not shocked! Overall, this seems to be much more positively sentimented which makes a lot of sense because Thriller is a critically acclaimed album that was praised worldwide. This album is very well produced and explored various music genres. Thriller set the tone for 1980s pop and rock music. Michael Jaackson is also best known and revered for this album!

Spotify API!

Michael_Jackson %>%
  filter(album_name %in% "Thriller")-> Thrilleralbum

Michael_Jackson %>% 
  filter(album_name %in% "Thriller") %>% 
  select(danceability, album_name, energy, track_name) %>% 
  kable()
danceability album_name energy track_name
0.842 Thriller 0.872 Wanna Be Startin’ Somethin’
0.843 Thriller 0.483 Baby Be Mine
0.681 Thriller 0.527 The Girl Is Mine (with Paul McCartney)
0.771 Thriller 0.687 Thriller
0.776 Thriller 0.711 Beat It
0.932 Thriller 0.457 Billie Jean
0.628 Thriller 0.409 Human Nature
0.894 Thriller 0.670 P.Y.T. (Pretty Young Thing)
0.662 Thriller 0.344 The Lady in My Life
0.842 Thriller 0.872 Wanna Be Startin’ Somethin’
0.843 Thriller 0.483 Baby Be Mine
0.681 Thriller 0.527 The Girl Is Mine (with Paul McCartney)
0.771 Thriller 0.687 Thriller
0.776 Thriller 0.711 Beat It
0.932 Thriller 0.457 Billie Jean
0.628 Thriller 0.409 Human Nature
0.894 Thriller 0.670 P.Y.T. (Pretty Young Thing)
0.662 Thriller 0.344 The Lady in My Life

We are going to look at the energy rate on this album, as it is considered a little bit darker for Michael Jackson’s sound and career.

Thrilleralbum %>%
  arrange(desc(energy))%>%
  ggplot(aes(track_name, energy, fill= track_name)) + geom_col() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

The energy on this album is very scattered as seen by the graph. While the rates are overall both high positive, it is pretty surprising to see the energy rate it not higher because of the fact that this album was so popular on the radios and charts after it was released. It is important to note that “Wanna Be Startin’ Somethin’” has the highest energy rate, as it was the least dark song on this album! Overall, this album was popular with good energy and it soared on the charts.

Bad (1987)

Dowloading the Genius API…

genius_album(artist= "Michael Jackson", album= "Bad")->Bad

Lets look at the word count and the 15 most popular words on the album:

Bad %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1    11
Bad %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()
word n
NA 11

Word Count: 4275 The top 3 words are “bad”, “annie” and “diana” which all titles of hit his songs from this album. This does not come as a shock, as these were hit singles from the Bad album, and are some of his most known songs, but looking at the sentiment of the album might give us a better sense of the mood of the Bad album, as it stood out as being less “poppy” and more of what MJ was trying hone in his talents to create. This album is unlike any of Jackson’s previous albums because Bad was a much edgier sound. Jackson incorporated pop and hard rock which was entirely different from his usual sound. He also used with modern technology, such as digital synthesizers and drum machines, resulting in a more aggressive sound on the album. (Information provided by https://en.wikipedia.org/wiki/Bad_(album)).

Bad’s Sentiment Analysis

Bad %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  inner_join(get_sentiments("bing")) %>% 
  inner_join(get_sentiments("afinn")) %>% 
  filter(!word %in% c("tahm", "igh")) -> Badsentiment

“Bad” has a negative sentiment which makes sense because this album was such a different sound then his two previous albums, which were much more 80s funk & groove whereas the set of songs on this album were a bit more hardcore rock influenced, which MJ was looking towards for his 3rd solo album. “Love” is another popular word, again… shocker! I’d rather focus more on “bad”. This album have much more negative sentiment and it is felt on the album because it focuses around heavy life topics.

Unfortunately, there is not album available for the Spotify API, so I created a word cloud to reflect the popular words in the album to emphasize how different the sound truly was.

Bad %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  anti_join(stop_words) %>% 
  count(word, sort = TRUE) %>% 
  filter(!word %in% c("tahm", "igh")) %>% 
  wordcloud2()

Wordcloud for Bad

“Bad”, “Annie”, and “Diana” are the words seen the most which is not a shocker! These are popular words on the album. Looking at the overall sentiment, this album is much more negatively sentimented which is not entirely surprising either because this album took a turn to be more rock and less pop, as Jackson was growing up and out of his little boy from the Jackson 5 persona. He was also dealing with the press following him and life very closely.

Dangerous (1991)

Downloading the Genius API…

genius_album(artist= "Michael Jackson", album= "Dangerous")->Dangerous

Take a look at the word count and the 15 most popular words on the album:

Dangerous %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1    14
Dangerous %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()
word n
NA 14

Word Count: 3844 Excluding “ooh” and “ah” because they are not technically words, the most popular words that stick out to me are “remember”, “time”, and “love”. The first two words are not too shocking given “Remember the Time” was a hit single on the album. “Baby”, “love”, and “faith” are also some popular words. It’s clear to see he sings about love often, it is seen on every album of his solo career!

Lets look at the sentiment analysis of these words:

Dangerous %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  inner_join(get_sentiments("bing")) %>% 
  inner_join(get_sentiments("afinn")) %>% 
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()->Dangerousentiment

“Love”, “faith” and “confidence” all have positive sentiment, but this album has more negative sentiment than positive. Around this time, Michael Jackson was about to go through trials regarding his sexual harassment scandal so it is no shock that his music reflected his life and how he felt in that time. The songs on this album focus more on self-betterment, welfare of children, and much more socially conscious topics.

Michael_Jackson %>%
  filter(album_name %in% "Dangerous")-> Dangalbum

We are looking at the danceability of Dangerous next.

Michael_Jackson %>% 
  filter(album_name %in% "Dangerous") %>% 
  select(danceability, album_name, energy, track_name) %>% 
  kable()
danceability album_name energy track_name
0.884 Dangerous 0.960 Jam
0.889 Dangerous 0.727 Why You Wanna Trip on Me
0.877 Dangerous 0.781 In the Closet
0.906 Dangerous 0.930 She Drives Me Wild
0.831 Dangerous 0.921 Remember the Time
0.873 Dangerous 0.973 Can’t Let Her Get Away
0.545 Dangerous 0.485 Heal the World
0.518 Dangerous 0.901 Black or White
0.861 Dangerous 0.594 Who Is It
0.502 Dangerous 0.855 Give In to Me
0.348 Dangerous 0.432 Will You Be There
0.751 Dangerous 0.646 Keep the Faith
0.268 Dangerous 0.186 Gone Too Soon
0.943 Dangerous 0.708 Dangerous
Dangalbum %>%
  arrange(desc(danceability))%>%
  ggplot(aes(track_name, danceability, fill= track_name)) + geom_col() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

This album’s danceability is varied between songs. For example, “Black or White” is a pretty upbeat song, but has low danceability, where as “Dangerous” which is a song with more heavy beats has higher danceability. This album was already varied in song and lyric style, but this further proves that Jackson’s sound changed drastically from his earlier solo career to 1991’s Dangerous phase.

HIStory: Past, Present and Future, Book I (1995)

Genius API

genius_album(artist= "Michael Jackson", album= "HIStory: Past, Present and Future, Book I")->HIStory

Lets look at the word count and 15 most popular words on the album:

HIStory %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  count()
## # A tibble: 1 x 1
##       n
##   <int>
## 1    30
HIStory %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()
word n
NA 30

Word count: 9744 The most popular words on this album are a combination of popular words from other albums because Disc 1 of this album are Michael Jackson’s top picks from his past albums (hence the title Past, Present and Future). Disc 2 features the newly released songs he put on this album.

Sentiment Analysis:

HIStory %>%
  unnest_tokens(word, lyric) %>%
  select(word) %>%
  anti_join(stop_words) %>%
  count(word, sort = TRUE) %>%
  inner_join(get_sentiments("bing")) %>% 
  inner_join(get_sentiments("afinn")) %>% 
  filter(!word %in% c("tahm", "igh")) %>% 
  head(15) %>%
  knitr::kable()->HIStorysentiment

“Bad” with a value of -3 and “scream” with a value of -2 stand out most to be because on this album, Michael Jackson had just closed out his trial around his sexual assault allegations and this album is most notably known as “HIS story”… a play on words for history. Jackson’s sound was angry on this album and it has very negative sentiment.

Much like Bad, there is no Spotify API for this album, so I created another wordcloud to understand what words are popular.

HIStory %>% 
  unnest_tokens(word, lyric) %>% 
  select(word) %>% 
  anti_join(stop_words) %>% 
  count(word, sort = TRUE) %>% 
  filter(!word %in% c("tahm", "igh")) %>% 
  wordcloud2()

Wordcloud for HIStory: Past, Present and Future, Book I

Aside from words that I categorize as sounds such as “ma”, “hoo”, “hee”, and “ah” words that stand out to me are words such as “cold”, “pressuring” and “stop”, as the sound on this album was reflective of Jackson feeling as though the media showed him little to no sympathy. According to Wikipedia https://en.wikipedia.org/wiki/HIStory:_Past,_Present_and_Future,_Book_I#Background, “several of the album’s 15 new songs pertain to the child sexual abuse allegations made against him and Jackson’s perceived mistreatment by the media, mainly the tabloids. Because of this, the album has been described as being Jackson’s most personal”.

Invincible (2001)

The Genius API for Invincible was unavailable, so I looked at the Spotify API solely for Jackson’s final studio album.

Michael_Jackson %>%
  filter(album_name %in% "Invincible")-> Invincalbum

I looked at both danceability and energy rates on this album and will compare the two below.

Michael_Jackson %>% 
  filter(album_name %in% "Invincible") %>% 
  select(danceability, album_name, energy, track_name) %>% 
  kable()
danceability album_name energy track_name
0.798 Invincible 0.824 Unbreakable
0.843 Invincible 0.947 Heartbreaker
0.821 Invincible 0.672 Invincible
0.658 Invincible 0.648 Break of Dawn
0.706 Invincible 0.685 Heaven Can Wait
0.854 Invincible 0.673 You Rock My World
0.708 Invincible 0.655 Butterflies
0.459 Invincible 0.370 Speechless
0.763 Invincible 0.742 2000 Watts
0.619 Invincible 0.568 You Are My Life
0.732 Invincible 0.769 Privacy
0.540 Invincible 0.491 Don’t Walk Away
0.664 Invincible 0.503 Cry
0.342 Invincible 0.346 The Lost Children
0.677 Invincible 0.741 Whatever Happens
0.860 Invincible 0.730 Threatened

Danceability first:

Invincalbum %>%
  arrange(desc(danceability))%>%
  ggplot(aes(track_name, danceability, fill= track_name)) + geom_col() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

Next, energy:

Invincalbum %>%
  arrange(desc(energy))%>%
  ggplot(aes(track_name, energy, fill= track_name)) + geom_col() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

The danceability and energy compared to each other is very dispersed on Invincible. There is much more variation of song style on this album and this album took a very big turn in terms of Michael Jackson’s normal “pop” sound. This was his final album and it was created after he chose to come back in the spotlight after his scandals in the press, so his sound and style had changed so much. Invincible was thus looked at as Jackson’s career comeback" according to Wikipedia https://en.wikipedia.org/wiki/Invincible_(Michael_Jackson_album). The energy is also very dispersed on this album, with some songs that had extremely low energy! It was noted that the album shifts between aggressive songs and ballads so it makes sense that the danceability and energy in the album are so dispersed and varied song to song. This album was definitely not as danceable as “Off The Wall” or “Thriller” for example.

Conclusion

After doing this extensive research on Jackson’s solo career and discography, it is clear to see that his sound and style take a really hard turn after “Thriller”. Jackson had broken out of his stereotype of being the little brother in Jackson 5 and worked on playing with his sound until he found what he liked, which can be seen in his later albums that have a harsher sound. With that being said, Jackson showed that life imitates art and used his love experiences to fuel his writing which is why his music took such a melancholy turn. When comparing his first and last solo studio albums, “Off the Wall” has primarily highly danceable songs in comparison to “Invincible” which is much more varied and spread as which songs have high energy and danceability. Overall, it is pretty clear to see through the danceability and energy rates that there is a severe drop after Jackson’s “Thriller” phase that his songs energy drops drastically, and there are few songs that spike in danceability rates.