Project 1 Return to jamescalixto.com

Analyzing Spotify's Top 100 Songs of 2017

(A group project for CS 3300: Data-Driven Web Applications at Cornell University. Yes, the source code is terrible. We didn't know how to really use CSS back then. Now we know better!)



Spotify's top 100 tracks have been collectively listened to billions of times.
We picked five outliers to help us determine the factors that make songs unique.





Each one of these five songs is an outlier in a different factor.
These factors, combined, determine how dynamic a song is.

We used principal component analysis (PCA) to find these five factors.
PCA mathematically tells us that they are the most significant factors in our dataset.




These five factors are (in order from most to least important):
loudness, energy, valence, speechiness, and tempo.


[dynamic score] =
- 0.580 * [loudness]
- 0.498 * [energy]
- 0.445 * [valence]
+ 0.326 * [speechiness]
+ 0.221 * [tempo]



Let's look at each of these factors in more detail.



There is a wide range of volume among songs in the Top 100.
Softer songs such as Location by Khalid, however, are noticeably less represented.





Energy is more evenly distributed.

That said, Just Hold On by Steve Aoki is noticeably more energetic than the next closest song,
Galway Girl by Ed Sheeran.





Valence is also evenly distributed.
The mean is almost exactly halfway between happy and sad.

Your Song by Rita Ora is almost as happy as a song can possibly be.
(At least by Spotify's metrics.)





According to Spotify's definition of speechiness,
values above 0.33 indicate both music and speech, either in sections or layered,
while values below 0.33 represent non-speech-like tracks.
(No track had above a 0.66, which indicates an entirely spoken-word track).

Mask Off by Future is one of the few vocal-heavy rap tracks
to make it into the Top 100.





Tracks are evenly spaced in the low 100 BPM region.
There are fewer tracks with higher tempos in the Top 100.

Bank Account by 21 Savage tied with iSpy (feat. Lil Yachty) by KYLE
for the song with the slowest tempo.











Now scroll back up to the main visualization.
Notice how each (outlier) example for these five factors lies towards the edges of the plot?

This means that our formula correctly recognizes the factors that distinguish outliers,
and conversely what factors make songs (more) mainstream.

Loudness, energy, valence, speechiness, and tempo
make songs distinctive and differentiate them from each other,
even when considering only the Top 100 songs on Spotify.











Interested in listening to these tracks to hear this for yourself?
Scan the song codes below the album art for each song to play them on Spotify.



Data sourced from the Spotify Web API via Kaggle
Album art sourced from Apple Music
Spotify codes generated through Spotify