Ever since Tones and I released her second single, ‘Dance Monkey’, back in May 2019, the song has been a continuous hit around the world. You’d be lying if you said that you hadn’t moved along to the groove or mouthed the words!

I was first introduced to the song by a friend who kept singing it during class. At first, it felt like he was repeating the same lines over and over again — “dance for me, dance for me, dance for me”, until I listened to the song myself. I noticed that there were a few phrases which were actually repeated. I went on to listen to another hit of hers, ‘Never Seen The Rain’ and found a similar pattern.

I decided to base this small project on the ideology that artists have a style when it comes to choosing words for their lyrics.

Using basic python skills, I’m going to analyse Tones and I’s top two hit songs: ‘Dance Monkey’ and ‘Never Seen The Rain’ to see if there are any similarities and how she creates her own music style ~ in terms of repeating words, use of accoustic words (like ‘oh’ and ‘ah’) etc.

1. Collecting & Cleaning Data

I got the lyrics to both songs from Metro Lyrics and edited them so there were no ‘,’ or extra spaces in between. I also changed words like ‘You’ve’ to ‘You have’ just to maintain the uniformity.

After this, I uploaded it onto JupyterNotebook as a string and assigned a variable (dm & nstr) to it.

#Dance Monkey Lyrics
dm = "They say oh my god I see the way you shine Take your hand my...make you do it all again All again"
dm = dm.lower()
#Never Seen The Rain Lyrics
nstr = "All your life no You could...never felt the rain rain rain"
nstr = nstr.lower()

The dm.lower() function changes the words to ensure that they are all lowercase. If this is not done, the program differentiates ‘You’ from ‘you’, thinking they are different words.

When printed, the result will look like this:

Since one of the aims is to find how many total words there are in the lyrics, it can’t be done when all the words are in a single string. In order to seperate them, I used the following code

split_dm = dm.split(' ')
print(split_dm)

The same was done for the Never Seen The Rain lyrics as well.

#python #data-science #comparison #music #programming

Lyric Comparison of Two Songs: Basic Python
6.70 GEEK