Visualizing my year in music with a calendar heatmap

Hi there, I’m Doce! 👋  I’m one of the many people in charge of developing and maintaining the Datawrapper application. I’m here today to talk about something I love: music charts!

It’s that time of the year again when everyone is sharing their Spotify Wrapped and most-listened album collages. I wanted to do something different this time. I grabbed all the data from my Last.fm profile from the past year and decided to build a calendar heatmap visualizing every song that I listened to in 2022.

Pretty cool, huh? The darker the square, the more songs I listened to on that day. As we can see, I listen to a lot of music. My “highscore” this year was 200 plays on January 13. In total, I have played 15,170 songs this year.

I noticed that most of my “darker days” were also the dates of single or album releases from artists I enjoy, and it makes sense I had been binge-listening to them around these days. For example, Beyoncé’s album Renaissance launched on July 29, and for four days straight, four different songs from it debuted as the most listened to on my personal charts.

The prize of the most listened artist of the year goes to the German singer and songwriter Kim Petras, with 1,026 plays. 🎉

These are my most-played artists, albums, and tracks:

My top 2022 artists

  • 🥇 Kim Petras - 1,026 plays
  • 🥈 Charli XCX - 898 plays
  • 🥉 MARINA - 638 plays

My top 2022 albums

  • 🥇 CRASH by Charli XCX - 432 plays
  • 🥈 SAWAYAMA by Rina Sawayama - 410 plays
  • 🥉 TURN OFF THE LIGHT by Kim Petras - 406 plays

My top 2022 tracks

  • 🥇 Beg for You (feat. Rina Sawayama) by Charli XCX - 91 plays
  • 🥈 Good Ones by Charli XCX - 83 plays
  • 🥉 Perfect Places by Lorde - 77 plays

How I built the calendar heatmap

Now, if you want to build your own music chart or repurpose this calendar heatmap, you can go ahead and edit it! Behind the curtains, it is a scatterplot with a square for each day, positioned on the axes into a calendar format. I achieved this manually, but you could also make a script to generate all the symbols’ positions in a CSV for you.

Talking about scripts, I made one to fetch all the tracks logged (or “scrobbled”) on my Last.fm profile since January 1. The script then calculates which song and artist I played the most on each day, asks the Spotify API for the album covers, and formats everything to fit this calendar format. Finally, it takes the play count for each day and converts it to the appropriate shade of green that’s used to paint each square in the calendar.

Spotify doesn’t always respond with the correct album cover, so I had to fix a few of them manually. A few song titles also had some errors and bad words I had to correct and redact.

Wrapping up

It was so fun to build this calendar heatmap, and it was super interesting for me to take a closer look at my listening habits. I would highly recommend anyone into music to set up a Last.fm account and start tracking their songs to get insights like this one. You will find a plentiful of resources to analyze and visualize your data, like Musicorum for generating collages and this mainstream calculator, just to name a few. Or, of course, you can build your very own chart using their API. The possibilities are endless!


I hope this chart will inspire you to build your own! That’s all from me, next week we’ll see a Weekly Chart from Veronika, our data vis writer. See ya!

Comments