Note
How to get your Spotify data?
You can request your Spotify data from official website.
Know more about your personal data on Spotify.
Spotify data file structure
spotify-data
├── Read_Me_First.pdf # Introductory document
├── Follow.json # Data about user's followers
├── Identifiers.json # Identification information (🙅 Do Not Share!)
├── Identity.json # User identity details (🙅 Do Not Share!)
├── Inferences.json # Inferred data from user activity
├── Marquee.json # Marquee-related information
├── Payments.json # Payment details (🙅 Do Not Share!)
├── Playlist1.json # Details about a specific playlist
├── SearchQueries.json # User's search queries
├── StreamingHistory0.json # User's Streaming history part 1
├── StreamingHistory1.json # User's Streaming history part 2
├── Userdata.json # General user data (🙅 Do Not Share!)
└── YourLibrary.json # User's Spotify library details like likes, albums, artists, etc.Philosophy
I want to analyze my Spotify’s Streaming History in a way from which I can know my listening pattern over the time. The way Spotify give the Spotify Wrapped at the end of every year.
The Dashboard
There has been a dashboard (using Streamlit) where other users can upload their
StreamingHistory.json files to see analysis on their history.
Some Awesome Insights
To gather insights from json files I’ve used polars and their builtin .plot accessor which uses
hvplot library under-the-hood.
See the Jupyter Notebooks to see all the insights.
Reference
| Short Code | Description |
|---|---|
| T/A | Track/Artist |
| T/As | Track/Artist(s) |
| P/A | Playlist/Album |
| P/As | Playlist/Album(s) |
These shortcodes used below for better readability.
Using StreamingHistory.json
Contains User’s Streaming History with trackName (Streaming Track Name), artistName (Streaming Artist Name),
msPlayed (Milliseconds Played) and endTime (When the track ends (as datetime)).
- Top T/As in whole dataset.
- Top T/As in each month.
- Monthly most listened Tracks and Artists.
- First day when T/A was played.
- No. of distinct T/As listened in each month/year.
- A T/A streaming in bar plot (which shows how you stream that during time-to-time).
- Which daytime user listen most and whom.
- Tracks which have listened most times in a day.
- Tracks streaming streak (by day/week).
- T/As which only played once
- Dates when user does not played any track
Using Playlist.json
Contains User’s Created Playlist Data with all the tracks added in the playlist.
- No. of T/As and Albums in each Playlist
- Playlist
MinutesPlayed - Most streamed P/As
- Check any Track present in multiple Playlists
- Streaming timeline of P/As (with
plot.line()) - Playlist-wise top T/As
Using YourLibrary.json
Currently Working!
Using Marquee.json
Currently Working!