Passion and craft Honouring a personal hero with data visualisation

This story starts on April 20, 2018. That day, one of my favourite artists died: Avicii. Just a week before the sad news came in, I saw a documentary about his life: True Stories. The documentary ended on a positive note. This made the news of his death even harder for me. About a month after his death, I decided to see if I could analyse his songs in a way that would maybe give me a new insight into his life.

I ran the analysis on three of his releases: True, Stories and Avicii (ep). The input for the analysis were 32 textfiles, one for every song on the three releases. I analysed every file with the Google Cloud Natural Language API. This API returns a score value, negative or positive, for the emotion in a song, and a magnitude value (the strenght of the emotion).

This was the first result:

We'll get a better understanding of the development of sentiment in his releases when we go through them one by one. Let's have a look at True:

As you can see, the songs are mostly positive. There is a big outlier in the top left corner that is both strong and negative. That song is 'Liar Liar'.

Next up is his second release, Stories:

The sentiment of his second album seems to be way more positive. The negative songs are close to the middle, and the positivity in the songs is way further to the right than the True songs were.

Third, Avicii (ep):

To me, this is the most balanced release of Avicii. It almost looks like an abstract butterfly, made of two negative songs, two neutral songs and two positive songs.

What does it all mean?

My original goal was to gain a better understanding of the sentiment in Avicii's releases. To see if this would help me better understand his career. But I started asking myself: Am I capable of getting any meaning out of this? As I am no psychiatrist or (data) scientist, the answer was clear to me: no. I decided to take a different path.

Paying homage to a personal hero

I liked the overall shape of the plot: it's an abstract visualisation of the discography of one of my favourite artists. So I took a creative detour. First up: change the colours of the graph. I removed the colours based on sentiment and swapped them for colours based on the albums: blue for True, pink for Stories, and yellow for Avicii (ep). This resulted in the following graph:

After showing it to friends and colleagues, I came up with the idea to print in on an everyday object. To make it printable, I had to remove the graph elements. This resulted in the following plot:

Next up, preparing it for print. I saved the image as an EPS (a vector illustration) and changed the colours of the graph to better match the album cover colours.

The last step was easy: look for a website that would print my design on an everyday object. I chose to have the design printed on a t-shirt:

In the end, I've used my programming skills to generate a personal tribute to one of my favourite artists: Avicii. A tribute that I can wear everyday. I'm happy with that.

This is the end of the general story. For super special extra stuff, read ahead.

Get your own

After sharing the project at Superweek 2019, I started thinking about sharing the visual publicly. I decided to go with two options:

Option 1: Request your own

If you're interested in a similar analysis of one of your favourite artists, you are in luck. I've created a step-by-step guide on how to request an analysis. After that, I'll turn it into a t-shirt for you. Open the guide.

If you are a programmer, consider option 2.

Option 2: Generate it yourself

If you are good with Python code or know someone who is: I've shared the code that generates the visuals on Github. You can use this code to generate the visual yourself, tweak the visual to your liking, or generate a similar plot of your artist of choice. Get it here.

Option 3: Print it yourself

Copy the Avicii visual from this location and use it any way you like.

Option 4: Buy it yourself

The convenient choice: Buy a t-shirt from me on

Scalability: plotting Jack Johnson

As the whole project is based on code (Python) the process can be easily repeated. Below is an example of another of my favourite artists: Jack Johson. The albums used are Bushfire Fairytales, On and On, and In Between Dreams.

The plot with sentiment colouring:

The plot with album based colouring: grey for Bushfire Fairytales, aqua for On and On, and yellow of In Between Dreams:

The tech behind the t-shirt.

I manually copied each songtext into a .txt. file. I used Google Natural Language API in Python to turn the songtexts into sentiment data. I saved that data in an Excel sheet. I then visualised the data from the sheet with Python using the Matplotlib package.

The end