avatarVishal Sharma

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2267

Abstract

years. But, after 1960, music makers brought more energy to the songs.</p><figure id="ae16"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*7kOir1Y2MObK0_0WeS39tQ.png"><figcaption></figcaption></figure><p id="1eae" type="7">Acoustic is long gone!</p><p id="ee44">On one side, energetic songs began to fire up. Acoustics, on the other hand, have shown a steep decline after the 1960s. As per <a href="https://en.wikipedia.org/wiki/Acoustic_music#:~:text=Acoustic%20music%20is%20music%20that,to%20electric%20or%20electronic%20means.">Wikipedia</a>, <b>Acoustic</b> music is music that solely or primarily uses instruments that produce sound through <b>acoustic</b> means, as opposed to electric or electronic means.</p><p id="403d">It means music makers nowadays are more inclined towards the electronic side of music rather than acoustic means.</p><figure id="1088"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Kb_Eeh9Pl9tuUmmDXEZDdA.png"><figcaption></figcaption></figure><h2 id="8cf9">Working with “data_by_artist” dataset</h2><p id="358d" type="7">Which artist has worked on most songs?</p><p id="0058">Using the “data_by_artist” dataset and sorting “Number of songs” by artists, I created a bar plot of the artists with most number of songs. Surprisingly, musicians in the past used to make a heck lot of songs. <b>Francisco Canaro even passed the threshold of 2000 songs!</b></p><figure id="e192"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*COIIwmzvN-P--zFvUG_DnQ.png"><figcaption></figcaption></figure><p id="74b4" type="7">What is the relation between danceability and energy?</p><p id="9712">Energy and danceability are highly correlated. Most numbers of songs have energy between 0.6–0.8 index while most songs are at the danceability of 0.6.</p><figure id="2465"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ARh9hA-aYJ4RatObVjC1uQ.png"><figcaption></figcaption></figure><p id="e028" type="7">Who makes the most “Danceable” music?</p><p id="4ce3">As people love energetic music and energy is highly correlated with danceability, I decided to bring out the artists on who music you can groove in the bar. “Young Bo” and “Young Boss” stood out amongst all.</p><figure id="c3a6">

Options

<img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*GeZnNgB10Qc0HGi9Znwhnw.png"><figcaption></figcaption></figure><h2 id="400f">Working with “data_by_genre” dataset</h2><p id="60f5" type="7">What are the most popular genres?</p><p id="d211">The most popular genre since 1921 has been “Russian Dance” which is very surprising for me. Till now, I haven’t heard of this genre</p><figure id="425f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*igZ6AG1OJhlcZCY2i9EKxg.png"><figcaption></figcaption></figure><p id="0a4a">After all this, I decided to do some fun exercise.</p><p id="0d55" type="7">How many artists have “Young” in their names?</p><p id="4eed">I found out there have 77 artists who have “Young” in their names. And, most of them are inclined towards making danceable, energetic, loud songs. What does it mean? Do people having “Young” in their names make more EDMs or hip hop songs?</p><figure id="093d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*wHoiKHluOwwa5lh5ZqjcLg.png"><figcaption></figcaption></figure><h2 id="feb5">Summary</h2><p id="a297">I have talked about some of the questions which can be answered using this dataset. Ans, there are dozens more.</p><ul><li>Analyzing the data of your favorite musician (For eg. Eminem)</li><li>What keys do people love listening?</li><li>Check the average length of songs of each artist.</li></ul><p id="f99d">You can answer “n” number of questions using this dataset. So, keep grinding!</p><div id="05bb" class="link-block"> <a href="https://towardsdatascience.com/investigating-a-dataset-using-pandas-and-seaborn-d83140603cf7"> <div> <div> <h2>Investigating a dataset using Pandas and seaborn</h2> <div><h3>In the life of a data analyst, there are hundreds of things to do. Data preparation, cleaning, exploratory analysis…</h3></div> <div><p>towardsdatascience.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*bnc6XQfNbXR6QIX3tNVK8g.jpeg)"></div> </div> </div> </a> </div><p id="f606"><b>Peace!</b></p></article></body>

Analyzing Spotify Data with Pandas

We need more acoustic songs!

Analyzing Spotify Dataset

Python is beautifully complemented by Pandas when it comes to data analysis. Pandas library lets us import any form of data, lets us analyze it, explore it, and even visualize it.

In this article, I have explored and analyzed the Spotify dataset available on Kaggle. The whole file has multiple datasets but I have worked on three datasets — “data_by_year”, “data_by_genre”, and “data_by_artist”. The Spotify dataset carries the artists’ records since 1921. The abundance of data will help us get to some key findings. Let’s find out.

Working with “data_by_year” dataset

Importing and Cleaning Data

I have imported all the libraries that will be needed in the whole data analysis process. I have worked with the “seaborn” library for my data visualization part. Seaborn brings a lot to the table when it comes to creating beautiful visualizations.

I have no NaN or null values in my dataset. On that part, I saved my effort. But, I had to drop one column “Unnamed: 0”. Now, we are good to go!

Exploring and Visualization

How well different features complement each other?

I decided to find the correlation between the music features. For many years, loudness and danceability are correlated, energy and danceability are highly correlated.

Energy is the new trend

Since 1921, the trend of making more energetic songs has boosted. Although it was slow and trembling in the early years. But, after 1960, music makers brought more energy to the songs.

Acoustic is long gone!

On one side, energetic songs began to fire up. Acoustics, on the other hand, have shown a steep decline after the 1960s. As per Wikipedia, Acoustic music is music that solely or primarily uses instruments that produce sound through acoustic means, as opposed to electric or electronic means.

It means music makers nowadays are more inclined towards the electronic side of music rather than acoustic means.

Working with “data_by_artist” dataset

Which artist has worked on most songs?

Using the “data_by_artist” dataset and sorting “Number of songs” by artists, I created a bar plot of the artists with most number of songs. Surprisingly, musicians in the past used to make a heck lot of songs. Francisco Canaro even passed the threshold of 2000 songs!

What is the relation between danceability and energy?

Energy and danceability are highly correlated. Most numbers of songs have energy between 0.6–0.8 index while most songs are at the danceability of 0.6.

Who makes the most “Danceable” music?

As people love energetic music and energy is highly correlated with danceability, I decided to bring out the artists on who music you can groove in the bar. “Young Bo” and “Young Boss” stood out amongst all.

Working with “data_by_genre” dataset

What are the most popular genres?

The most popular genre since 1921 has been “Russian Dance” which is very surprising for me. Till now, I haven’t heard of this genre

After all this, I decided to do some fun exercise.

How many artists have “Young” in their names?

I found out there have 77 artists who have “Young” in their names. And, most of them are inclined towards making danceable, energetic, loud songs. What does it mean? Do people having “Young” in their names make more EDMs or hip hop songs?

Summary

I have talked about some of the questions which can be answered using this dataset. Ans, there are dozens more.

  • Analyzing the data of your favorite musician (For eg. Eminem)
  • What keys do people love listening?
  • Check the average length of songs of each artist.

You can answer “n” number of questions using this dataset. So, keep grinding!

Peace!

Data Science
Python
Programming
Data
Music
Recommended from ReadMedium