Can we quantify different features of music?

Now, you might ask yourself why not just pick the songs you like the most?

Not a chance, I believe in data and Illproveto you which songs you should like.

Dry data analysis of Christmas songs to get you in the holiday mood

So lets get ready for some zestful musical insights!

This is primarily a song curation tool that can be used with Spotify to accessvarious playlists.

Yes, thats the playlist with which Ill work.

Article image

I used the amazingspotifyrpackage for R to grab all the details of the songs in the playlist.

It requires access to Spotify API which can be obtained via officialdeveloper platform.

It’s free, every week, in your inbox.

Article image

Precisely here is what were going to understand in this meticulous yet Christmasy article:

Sounds fun, right?

Go grab a hot chocolate and lets get started.

Also, note that the average length of all the songs comes close to 207 seconds.

Article image

Frequently used keys

So, which are the frequently keys used in these Christmas hits?

Probably this will help the musicians looking to produce next popular Christmas song in terms of key selection.

No wonder so many artists have been covering this song for decades.

Article image

Heres the explanation directlyfrom the horses mouth 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).

Article image

Again the most danceable song is also the most positive song.

So, is there a statistically significant relationship between these features?

Lets answer that in next visualization!

Article image

For instance, in India, duringDiwalifirecracker usage lead to higher hospitalization rate because of burn injuries.

For correlation between the musical features, Ill create a colour-coded correlation matrix using ggcorrplot package.

Correlation in this matrix is based on thep-valuewhich shows positive correlation in peach color and negative in bluish color.

Article image

Statistically insignificant correlation between variables have been crossed out.

Now we can infer the following:

Important point: correlation doesnt always mean causation.

As expected, these features have similarity in terms of distribution.

Article image

However, what causes higher valence?

In other words, what attributes to positiveness in music?

Another, important variable is tempo, which is the speed of the musical piece.

Article image

Now Ill use a heatmap to visualize how key and tempo combination increase positiveness of a song.

We also uncovered the positive songs along with the correlation of musical features.

Story byPreetish Panda

Preetish Panda manages marketing at PromptCloud, a Bangalore-based data-as-a-service provider.

Article image

He is passionate about convergence of technology, marketing, and analytics.

Also tagged with