lucasguo
projects / spotify-playlist-analysis
building

Spotify Playlist Analysis

A Python pipeline that groups my 700+ song Spotify playlist by genre and charts its contents: it pulls artist tags from the Last.fm API and maps them to hand-picked buckets with pandas. Matplotlib charts show release years, when songs were added, top artists, song length and popularity. The secondary goal is to learn how to call and cache a real API and clean messy data with pandas.

Language
Python 3.12
Data
pandas
Charts
matplotlib
APIs
Last.fm
Input
Exportify CSV
Planned
Spotify Web API, Spotify streaming history

Roadmap

  1. Done: KM 1

    Data Pipeline

    Export the playlist with Exportify and fetch Last.fm tags for all 568 artists, with a local cache.

  2. Done: KM 2

    Playlist Charts

    Chart 702 songs by release year, month and hour added, artist, length, popularity and explicit content.

  3. In progress: KM 3

    Genre BucketsNow

    Map Last.fm tags into five hand-defined buckets and fix tag quality so no single bucket holds most songs.

  4. Up next: KM 4

    Spotify Playlists

    Rebuild each bucket as its own Spotify playlist through the Spotify Web API.

  5. Up next: FINISH

    Listening History

    Add Spotify's streaming history to find unplayed songs, the most-skipped tracks, and genre weighted by plays.

Build log