Visualizing La La Land's emotional roller coaster using Spotify data
by Damar Aji Pramudita - August 2017

If you think La La Land's ending is despairing, you are not alone. I watched the first half of the movie thinking that it is another too-good-to-be-true kind of movie, until the movie finale slapped me back to reality. It turned out that other people are also having a debate over this issue. Some think that it was realistic and inspiring, but others were upset that Mia and Sebastian chose to chase their dreams over romance.

Regardless of whatever emotional state you were by the end the movie, you must agree that La La Land has done a good job playing with the audiences' emotion. Furthermore, the ups and downs of Mia and Sebastian's relationship is nicely accompanied by the use of music throughout the movie. It was, afterall, nominated and won the Best Original Score in both the Golden Globe and the Academy Awards.

Since the nominees in the Best Original Score category are typically selected by how well the film scores assisting the story of a movie, I now wonder if we can use La La Land's scores to measure the happiness level of its ending. Well, we might be able to, but now we have another question: how can we measure the happiness level of a song?

Luckily, Spotify provides a web API that allows you to pull audio features for a track, such as danceability, tempo, or energy. I have interest in one particular feature called valence, which I think might provide an answer to the question. Spotify defines this feature as

"A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry)".

While Spotify does not explicitly describe how they come up with such value, they mention that it involves a manual classification by a music expert, followed by extending the classification rule to other songs using machine learning.

Following this, I collect the valence rating for songs used in La La Land, then plot each tracks' valence rating in a chronological order, the result of which you can see below. As you scroll down the page, you will observe changes in the emotional valence throughout the movie from the beginning to the end. I am neither an expert in music nor machine learning, but I think the plotted graph quite representing the fluctuation of my emotional state when watching the movie. How about you? Keep scrolling down to experience it yourself.


Judging from merely the Spotify valence rating then, we can agree that La La Land's ending is pretty despairing. In fact, almost all scenes were accompanied by despairing songs. During Mia and Sebastian's time together, only two moments were accompanied by positive tracks: when they were discussing Jazz in the club (Herman's Habit) and during the summer, when they are officially together (Summer Montage). After that, things started to go downhill until the ending.

However, if we look back from the beginning of the movie, La La Land is more about chasing dreams than chasing love. Mia has consistently showed her ambission to make it big in the show business, looking for 'Someone in the Crowd' that could lift her off the ground and take her where she want to go, not someone that she can just live happily ever after with. So while both the final scenes and the accompanying track may depress you (because apparently it goes as intended), you should be more hopeful knowing that the decision allows them to fulfill their dreams in the end.