How do you BECOME a famous song writer
By: David Hartmann
Tags: Spotify, Music, Songwriting, Linear Regression, Machine Learning

Benjamin Britten: ‘The old idea of a composer suddenly having a terrific idea and sitting up all night to write it is nonsense. Nighttime is for sleeping.’

Yes, that is true. You need a restful sleep as a famous and creative song writer. But do you only need creativity to write popular music? What are the key drivers? Are there hidden rules to write a song? Not just any song, but a song which will become popular!!!

In this study based on a Spotify Dataset from Kaggle with 170k tracks released between 1921 and 2020 I investigated a set of input features and their dependence on song popularity.

During the analysis of the dataset a set of questions came into my mind:

In order to write a popular song, is the key and mode of the song important? 1955–1960: The popularity level climbs up — Who were the most famous artists at this time? Which actual top artists write/have the most popular songs? How do you become a famous song writer?

Let’s start the investigation:

The dataset splits into 170653 rows and 19 columns. Those 19 data columns are divided into 13 numerical and 6 categorical columns:

Numerical columns:

acousticness: The relative metric of the track being acoustic, (ranges from 0 to 1)

danceability: The relative measurement of the track being danceable, (ranges from 0 to 1)

energy: The energy of the track, (ranges from 0 to 1)

duration_ms: The length of the track in milliseconds (ms), (integer typically ranging from 200k to 300k)

instrumentalness: The relative ratio of the track being instrumental, (ranges from 0 to 1)

valence: The positiveness of the track, (ranges from 0 to 1)

popularity: The popularity of the song lately, default country = US, (ranges from 0 to 100)

tempo: The tempo of the track in Beats Per Minute (BPM), (float typically ranging from 50 to 150)

liveness: The relative duration of the track sounding as a live performance, (ranges from 0 to 1)

loudness: Relative loudness of the track in decibel (dB), (float typically ranging from -60 to 0)

speechiness: The relative length of the track containing any kind of human voice, (ranges from 0 to 1)

year: The release year of the track, (ranges from 1921 to 2020)

id: The primary identifier for the track, generated by Spotify

Categorical columns:

key: The primary key of the track encoded as integers in between 0 and 11 (starting on C as 0, C# as 1 and so on…)

artists: The list of artists credited for production of the track

release_date: Date of release mostly in yyyy-mm-dd format, however precision of date may vary

name: The title of the track

mode: The binary value representing whether the track starts with a major (1) chord progression or a minor (0)

explicit: The binary value whether the track contains explicit content or not, (0 = No explicit content, 1 = Explicit content)

Ok, now we tackle the first question…

Part I: In order to write a popular song, is the key and mode of the song important?

Let’s start with key/mode distributions: Take a look at the plot setting below. In the bar plot (figure 1, left) you can see the distribution of the primary keys usage between 1921 and 2020 in descending order. It is not a surprise that most of the songs are written in C, G or D major scale (approximately 20% of all songs between 1921 and 2020 are written in the keys C major or G major). In addition, more than 70% percent of the songs are written in major mode (figure 1 right). It is a known fact that for the majority of musicians songs in major C or G are easier to sing or play than in other keys.