See Your Spotify Listening Habits in a Simple Way
- About
- Features
- Requirements
- Installation
- Project Structure
- Examples
SPOTILYZE is a Python tool that helps you understand your Spotify listening history. It takes your Spotify data and shows you what songs and artists you listen to the most, when you listen, and how often you skip or finish songs.
- Easy Data Loading: Quickly load your Spotify streaming history (JSON file).
- Top Songs & Artists: Find out your most-played songs and favorite artists.
- Play Status: See if you usually skip, partially play, or fully play songs.
- Listening Trends: Check what time of day and which days you listen to music the most.
- CSV Output: Get a detailed CSV file with all your analyzed data.
- NEW: Data Visualization (v1.3): See your listening habits with easy-to-read charts using matplotlib.
You can view bar charts and histograms for your top songs, artists, play durations, and listening times.
What’s new:
- Added feature to visualize your Spotify data with matplotlib charts.
- Now you can see your listening patterns in colorful graphs, making your data easier to understand.
- Make sure you have installed the required libraries:
pip install matplotlib numpy pandas
...
You need these to run SPOTILYZE:
- VS Code: Version 1.57 or newer
- Python: Version 3.1 or newer
- Pandas Library: Version 1.2.0 or newer
You need your Spotify Extended Streaming History.
How to get your data:
- Go to the Spotify Privacy Settings page and log in.
- Request your "Extended Streaming History.
- Spotify will email you a ZIP file in 1-7 days.
- Unzip it and find files like
StreamingHistory_music_0.json,StreamingHistory_music_1.json. Pick one to use.
- Download the Project:
Open your terminal or command prompt and run:git clone https://github.com/PandhuPrayogo/SPOTILYZE.git
- Install Python:
Download from python.org - Install Pandas:
In your terminal, run:pip install pandas
- Open in VS Code:
Open the project folder in VS Code. Check your Python and Pandas versions:python --version
import pandas as pd print(pd.__version__)
- Add Your Data:
Put yourStreamingHistory_music_X.jsonfile in thefolder_file/folder. - Set the File Name:
Openscripts/spotify_analyst.pyand change thefile_pathvariable to match your JSON file name. - Run the Script:
In thescripts/folder, run:python spotify_analyst.py
SPOTILYZE/
├── folder_file/
│ └── StreamingHistory_music_1.json # Your Spotify data
├── results/
│ └── final_result.csv # Output file
├── scripts/
│ └── spotify_analyst.py # Main script
└── README.md # This file
What’s in your data file:
endTime: When the song finished playingmsPlayed: How long you listened (in milliseconds)artistName: Artist or band nametrackName: Song title
Top Rows of Data:
endTime artistName trackName msPlayed
0 2025-01-06 02:45 GFRIEND Sunny Summer 1230
1 2025-01-06 02:45 Red Velvet - IRENE & SEULGI Jelly 1068
2 2025-01-06 02:49 GFRIEND FINGERTIP 210102
Most Played Songs:
trackName
Memories of Summer 138
Season of Memories 111
Butterflies 79
...
Most Listened Artists:
artistName
Red Velvet 628
GFRIEND 445
TWICE 383
...
Play Duration Status:
endTime artistName trackName msPlayed Real Time Status
0 2025-01-06 02:45 GFRIEND Sunny Summer 1230 1.230 Skipped
1 2025-01-06 02:45 Red Velvet Jelly 1068 1.068 Skipped
2 2025-01-06 02:49 GFRIEND FINGERTIP 210102 210.102 Full Play
...
Listening Trends by Time:
Hour
21 2
22 137
17 155
...
Day
Friday 1093
Sunday 1119
...
Final Data Example:
endTime artistName trackName msPlayed Real Time Status Hour Day
2025-01-06 02:45 GFRIEND Sunny Summer 1230 1.230 Skipped 2 Monday
...
If you like this project, you can support me or give feedback!
Buy me a coffee: https://saweria.co/Yewonnie