Spotify Top Songs Exploratory Analysis
Introduction
In this post, I'll briefly explain a project I undertook to analyze Spotify tracks data. The goal was to explore song popularity, the relationship between track duration and popularity, and the impact of explicit content on popularity.
Step 1: Importing Libraries and Loading Data
I imported necessary libraries, loaded the dataset into a pandas DataFrame called df
, and performed basic preprocessing.
Step 2: Data Preprocessing
I converted date columns to datetime objects, calculated track age in days, and removed duplicate track names.
Step 3: Exploratory Data Analysis
I performed various analyses, such as plotting the distribution of track popularity and analysing the relationship between track duration and popularity.
Step 4: Calculating Individual Artist Popularity
I created a DataFrame to store the popularity of each artist, dividing the track popularity by the number of artists in a track, and then summing the popularity for each artist.
Step 5: Visualising the Results
I visualised the top 20 most popular artists and explored the impact of explicit content on track popularity.
Conclusion
In this project, I analysed various aspects of Spotify tracks, including popularity, duration, and explicit content. By following these steps, you can perform similar analyses on your own datasets and uncover interesting insights.