The Sentiment of Rock Stars

An R tutorial to navigate through decades of song lyrics by artist, for beginner and advanced R users

Martina Pocchiari
11 min readNov 22, 2020

Article preview: we will combine web scraping, parallel computing, and simple sentiment analysis algorithms in R, to visualize the evolution in the emotion of song lyrics for your favourite artists. We will go through the process together, step by step!

For my own research projects, I recently had to make the acquaintance of a few – new and improved –sentiment analysis algorithms. But before diving into my research data, I decided to test the sentiment analysis code in a more entertaining setting.

And I want to take you with me, on a journey through the excesses of the glam rock stars of the 70’s, the flashy outfits and the social turmoil of the rock bands in the 80’s, all the way through the iconic songs of the 90’s, and up to the contemporary sounds of the 2010's.

Why don’t we use R together, to the explore the lyrics of the songs from our favourite (well, my favourite) rock artists?

Did the songwriters kick off their careers on a melancholic tone? Or did they first top the charts with cheerful emotional landscapes? How did their sentiment evolve, as their career (and their fame) progressed? We will answer these questions borrowing the lyrics from the albums of a few, iconic artists from different decades: Elton John, Joy Division, and Nine Inch Nails.

--

--

Martina Pocchiari

Assistant Professor @ NUS Business School. Studying online communities, social networks, information consumption. More about me: http://bit.ly/mpocchiari