Skip to content
Does faster tempo mean happier music?
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Output Plot.png

Is faster music happier?

A project by Will Lawrence


In this program, I will use a dataset of 2000+ songs from Spotify and I will analyze how positive (i.e. happy, cheerful, upbeat) a list of songs created with an inputted tempo are. That is, given a tempo (in beats per minute), this program will plot the valences (a measure from 0.0 to 1.0 describing the musical positiveness) in a scatter plot of a list of songs with tempos greater than or equal to the input. The key to this plot is a measure of happiness called valence, which is defined as follows:

Valence (float) - 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). This measure is generated by Spotify algorithms.

Another important definition is the tempo:

Tempo (float) - The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.

This topic interests me as I really enjoy upbeat and positive music. Recently, I've started to notice that faster songs generally make me more energized, but I was curious on how this faster pace is associated with happiness. I used what I learned about systematic program design to break down this problem into more concrete steps. This includes defining songs as data, plotting the necessary data, and removing songs that do not meet the criteria.

To view the final program and output, I recommend looking at the Jupyterposter.ipynb notebook. All the individual elements of the program can be found seperately in this repo

You can’t perform that action at this time.