This treemap groups Spotify genres from top artists into broader sections. After you log in with Spotify, the chart updates to show your own listening data.
Originally made as an INFO 474 project at UW.
Spotify gives each artist a list of detailed genre tags, like "indie rock," "trap," or "neo soul." This project checks those tags against a set of broad genre rules, then places each matching tag into a larger category such as Rock, Pop, Electronic, or Hip-Hop & Rap.
For each artist, the code first finds the broad categories that best represent that artist's genre list. It mostly counts tags that belong to those strongest categories, which keeps one artist with lots of scattered tags from overwhelming the chart.
A few hybrid genres are kept even when they cross categories, like "folk punk," "country rock," or "trip hop." After every artist is counted, the genres are sorted into the treemap: bigger sections mean that genre appeared more often across your top artists for the selected time range.