Back to Blog

insights from spotify streaming history: the spotistats project

Spotify is one of the most popular music streaming platforms worldwide, offering users an extensive library of songs and podcasts. As an avid Spotify user, I was curious to explore my listening habits in detail. This curiosity led to the creation of Spotistats, a data analysis and visualization project designed to uncover insights from my Spotify streaming history.

Introduction

Welcome to Spotistats, a project that delves into the depths of my personal Spotify usage. With this project, I aim to understand my listening preferences, track my most-played songs and artists, and uncover patterns in my streaming habits.

Getting the Data

To start this journey, I downloaded my Spotify streaming history from Spotify's Privacy Setting section. This feature allows users to download their personal usage data, providing a detailed record of every track played.

Tools and Technologies

For this exploratory data analysis (EDA) project, I utilized several powerful tools and libraries:

  • Jupyter Notebook: For interactive coding and visualization.
  • Python: The backbone of the project, providing versatility and simplicity.
  • Pandas: For data manipulation and analysis.
  • Matplotlib & Seaborn: For creating visualizations.
  • WordCloud: For generating word clouds.
  • NumPy: For numerical computations.

Data Cleaning and Preparation

The raw data obtained from Spotify required some cleaning and formatting to be useful for analysis. Key steps included:

  • Loading the Data: Importing JSON files into Pandas DataFrames.
  • Selecting Relevant Columns: Focusing on columns like track name, artist, playtime, and platform.
  • Converting Timestamps: Ensuring the 'Play-Time' column is in datetime format.
  • Extracting Date and Time Information: Deriving year, month, day, hour, etc.
  • Dropping Irrelevant Columns: Streamlining the dataset for analysis.

Exploratory Data Analysis

Top 10 Favorite Artists

Understanding my top artists based on listening time and play count. This analysis provided a clear picture of which artists dominated my listening habits.

Unique Tracks Analysis

Calculating the percentage of unique tracks played. This helped me understand the diversity of my listening preferences.

Day Wise Usage

Analyzing active usage in a day over a week with a heatmap. This visualization highlighted periods of high and low streaming activity, providing insights into my listening behavior throughout the week.

Songs Played Each Day

Visualizing the number of songs played each day with a scatter plot. This revealed trends and patterns in my daily listening habits, including identifying the day with the maximum number of songs played.

Word Cloud of Top 100 Favorite Artists

Generating a word cloud to visualize the top 100 favorite artists based on the number of times their songs were played. The size of each artist's name in the word cloud is proportional to the number of times their songs were played, providing a visual representation of my most frequently played artists.

Conclusion

Spotistats provided valuable insights into my Spotify listening habits, revealing patterns and preferences that I was previously unaware of. By leveraging powerful data analysis and visualization tools, this project showcases the potential of personal data analytics.

If you're interested in exploring your Spotify data, you can check out the project on GitHub: Link