Skip to main content

Pretty Good Hat

Tag: data

Data storytelling with last.fm: Ever since wondering if I could make something vaguely Spotify Wrapped-like with data from last.fm, I’ve dived deep into retrieving, slicing and making pictures of my music data over the past several years. Experimenting with a view of my most-played tracks over, it started to click for me just how many stories are found in this data, that this is much more than listening history – my own stories are embedded in this data, too.

In this plot of my most-played tracks for each year since 2005, you can see the huge spike in 2015, featuring huge numbers of plays of songs by Lord Huron, Frank Taylor, Hem, and Josh Ritter. I knew immediately what this was: The bedtime playlist for our kiddo, whom we would tuck in and leave to listen to songs they loved at the time. They’ve never, ever slept well without a lot of work, and for a while we had a beautiful routine of tuckins and music.

a parallel coordinates plot showing many colorful dots and a vertical spike of much larger dots in 2015

It’s a little bittersweet to see this, as it represents a really hard time in all our lives but also signifies a lot of love and, in the music itself, something that’s always been and continues to be really special.

(Methodological note: Because the spike in 2015 is so high, I had to re-do the entire plot on a log scale in order to see any variation at all in the lower-numbered tracks! I made up for that by scaling the size of the dots to the true total annual play count of each track.)

You can see the data entirely fall off a cliff after 2015. This same picture also tells the story of the death of Rdio, at one time my very favorite way to listen to music and which had great support for tools like last.fm; I replaced it with Apple Music, which has never natively supported that record-keeping, so 2015 is the last year until 2020 that I even have much of this information.

That, of course, is the first year of pandemic and also the first year I started using Roon, listening to music exclusively at home, and shifted all my workouts to home, too. So that big 2020-2021 spike of lots of colors? That’s my wife and me lifting weights and doing squat jumps in our living room!

a colorful stack of close-together dots in a scatterplot

In 2007 you can see the light blue dots appear: That’s when I started listening to Josh Ritter, while away from home for a few months. I was living alone in Bellevue, WA, on a pre-doctoral internship, and carrying my iPod in my pocket while jogging or walking in the park across the street from my long-term company housing complex. I can trace those light blue dots and lines all the way through to now (though the frequency of that workout playlist swamps even my favorite artists right out of the annual top twenty). And looking at this graph I can see the trails in that little park, remember the first time I heard Josh Ritter play “Wings” in my headphones; I can recall tucking the iPod into the console of my rental car, and then spiral into memories of the post-internship vacation that my wife and I took up to the San Juan Islands, where years before I spent a summer teaching climbing.

photo of a shiny silver car gear-shift, with a white third-generation iPod tucked beside it

I can click the 2011 dots to see the music I played for our kiddo in the car while driving to and from day-care. There are some silly kids songs that they used to love, and I was also on a pretty good OK Go kick at the time, so “This Too Shall Pass” was a common track in the car. God that song still gets me. I got into TV On the Radio around this time, too, and found it good car music. (Again: Thanks to Rdio, I was discovering and listening to a lot of music.)

Way back in 2005-2006 I was working at home on finishing my disseration. In iTunes I had albums from Richmond Fontaine and Tom Waits in heavy rotation – Ripped from actual CDs that I bought at Gopher Sounds in downtown Flagstaff!

I’m honestly surprised that last.fm is still operating. I’m not sure what it really does, anymore that would make revenue, but I’m glad it’s still there and that I have good tools to store my listening history once again (Oh – including now adopting Marvis as a great iOS app for scrobbling when I do listen to Apple Music again, thanks to some good discussion with music folks at micro.blog!) When scrobbling stopped working reliably there after 2015, for a while I decided that I didn’t care: listening to music was an ephemeral experience, and so would be my interest in online web-2.0 tools, I reasoned, and I made peace with leaving behind that history.

Now, as long as it continues to work, I’m so happy to have this somewhat constant and almost invisible trace, this throughline of so many moments in my life.

screenshot of a parallel coordinates plot, which draws lines between ranked points over time. The Josh Ritter song 'Good Man' is highlighted as the top ranking track in 2013, and has lines connecting to its rank in several prior and subsequent years.

Today’s last.fm data time produced this plot of my top 20 tracks for each year since 2005. I’m going to write a (much?) longer post about this, because it has my brain really spinning on storytelling with data; for now, enough to say I’m excited and having a good time!

screenshot showing a plot of data bars

Continuing to tinker with last.fm data, I’ve built a tool to pull my per-track history, and I can do a bunch of fun things with that detail. This plot shows how much I listened to artists in their first year in my data set, compared with all listening in the same year.

Playing around with my last.fm stats Shiny app a bit more this morning, and I remembered how to get what I want out of a nested list returned from the API with only 20 minutes of cursing. Progress!

Destiny 2 Power leveling tool in R

The latest piece of my homebrew Destiny 2 toolset is Travelr, a power leveling tracking tool built with R and using a much simpler process than most of my prior nonsense. (Aside: I'm still using ArmoreR, but it has some key limitations that I haven't spent much time with, including a problem incorporating the authentication flow more fully into Shiny so that I could make it an app that others could use in a more friction-free way.)

The power climb is part of the game with each new Destiny season. A lot of this process is luck: A player can only get so many pinnacle drops per week and there's no guarantee that a given drop won't be in a duplicate category. But, some drops can be targeted to broad categories -- armor versus a weapon, for example -- and there is some efficiency across characters if you can strategically raise one category to increase the base level for all characters. 

I was inspired by a fantastic tool written by a member of the small Destiny 2 community I'm in, that identifies categories to target (or, try to target, anyway; a lot of it is still frustrating random luck, sometimes), and decided to try building my own version. It doesn't do anything unique, but it works and it's wonderfully satisfying to step through an R markdown notebook that authorizes me to the D2 API, retrieves all my equipment statistics, calculates my maximum power level and indicates which, if any, categories should be targeted.

For example, here's a screenshot from the beginning of the season, where every single equipment type would increase my total maximum power level:

A screenshot of a table of data showing lots of equipment categories that would increase power level to the next integer

... and later in the season:

Travelr screenshot showing a table of armor and equipment values, highlighting values that would increase the total maximum power level to the next highest integer

It's been great fun to have this small tool with me during the season's play. It's currently dependent on another small tool that grabs the equipment "manifest" file, and I'll be publishing the whole notebook to github when I finish incorporating that into the repository. 

Preparing to troll my team by visualizing time series data using a donut plot. This is going to be great.