If you’re a casual reader of this newsletter, you might not know that I was formally educated as a data scientist. When I graduated from UC Berkeley in 2023, I really wanted to write and make music and never look at a coding interface ever again. I have very much enjoyed writing and working in the concert industry, which couldn’t be further from a desk job. But in the intervening year or so, I’ve also rediscovered why I liked coding in the first place: making cool shit.
Introducing turntable.amayalim.com
What started as a personal data analysis (how many of my playlists contain Wilco songs, actually?) turned into a small project centered around my Spotify activity. The Spotify API is pretty robust; you can access a lot of your own data if you have some understanding of how APIs work (I didn’t). I taught myself how to get my playlists and all their data in a readable format from the service without overloading the server and then set about writing a teeny tiny AI model that ranked playlists by their similarity to one another. The software calls these “neighborhoods”, which I think is cute:
I don’t want to scare anyone with the term AI or algorithm, which is really what turntable is at its core. It’s quite simple, and I believe it lacks the aspects of other ranking algorithms (Inst*gram, Sp*tify, etc) that make them evil. For example, there is no inherent weighting or bias in the model; it just takes innate qualities of the tracks and averages them out as a proxy for playlist qualities. If you’re interested in all that jazz, you can view the source code here.
The algorithm determines the “distance” between playlists based on two sets of markers: audio features and genres. Audio features are sort of esoteric quantitative descriptors that Spotify gives to songs and make little sense on a granular scale, but they start to be more interesting when you see trends for them:
The initial model determined closeness from just these audio features, but I didn’t feel like it was recommending playlists that I personally would, as a curator. I decided to add another set of markers, this time pulling genre information for artists and attaching them to their respective playlists.
The model performed better with these markers (I did some math to them that you can see in the source code if you’re interested), and then I realized that I had a Python script and not much else to show for it. Most people could figure out how to run a script on their machines, but I really wanted it to be a feature of this newsletter, for my subscribers to utilize alongside the writing to discover new music. I decided to code a web app to build an interface for my model.
This step turned out to be way more complicated than I originally thought. First of all, I am not a web designer or developer, and I realized the little HTML I’d learned in high school was not going to cut it for the complex API calls, database queries, and model outputs. I ended up building a Flask app and running the databases on SQLite.
These stages were kind of difficult because the interface bit was not my favorite aspect of the project, I can’t lie! I really enjoyed building the model and doing the data science aspects—I loved seeing the charts and graphs—but I didn’t enjoy the CSS coding. It was something I’d never done before, and it was hard to see progress because I broke the site a thousand times in the process of making it better. I’m really a data scientist, not a software developer, so I found the UI aspect rather difficult; I thought I would like design, but it was difficult for me to do on the fly, as I was coding.
My partner helped me make all the moving parts of Record Store and turntable, because I have no Photoshop skills. A few of my friends beta tested the site to see where it would break, and there are still bugs, but it mostly works. You can use the site in two ways, artist exploration and playlist exploration.
By clicking on the artist names you can see other playlists that feature that artist. Because Record Store playlists never repeat a song, these are unique instances of the artist appearing again elsewhere in the playlist map.
The second way to explore is via the “recommended” playlists at the bottom of each playlist page. These are ranked by similarity of audio features and genres, which I think does a pretty good job of approximating how I would recommend a playlist to a friend who asked me, “I really like this one, got any more like it?”
What I like about turntable is that it provides a sort of lost experience in modern music discovery: going down a rabbit hole and ending up somewhere completely different. With listenable links in the form of the little blue play buttons, users can check out playlists or tracks while clicking around for other discoveries. I enjoy going through the recommendations and trying to determine where the algorithm is picking up a similarity—is the music mostly the same energy, tempo, etc? My early playlists tend to be rather genre-agnostic; I like seeing how the model deals with them, as I’d have no idea how to categorize them myself.
Record Store is not going anywhere! In fact, hopefully now that this project is mostly done (I still hope to add some features like an interactive map or a search bar), I’ll have more time to write again. It’s nice to have all my playlists in one place for Record Store readers; the Spotify interface only lets you see about two hundred, which is really a drag. I’m proud of myself for building something so robust! I hope it’s useful for people other than myself.
I’d love to know what you think of turntable if you use it! And I’d also love to know if it’s something you’d pay for. I’m looking to grow the paid subscription experience and membership, and I’d really like to know what it is that my paid subscribers want to see, as well as if everyone thinks turntable is a service that’s worth paywalling.
In the spirit of exploration and experimentation, I’m going to remove all paywalls on Currently for January. I’m going to try some new stuff, and see what sticks and what gets no engagement. If you’re a paid subscriber, I hope you maintain your subscription as a token of support for my work as I figure out this next step towards improving your experience. If you’re a free subscriber, I hope you see something you like in the Currently segment and consider upgrading to paid. And if you’re a hiring manager, I hope you look through the source code of turntable and give me a data science job so I can write all of Record Store for free forever (not kidding).
Thanks for reading this very long newsletter! It’s been a weird year for music, but finishing turntable and being able to explore my own taste again has been really exciting and enriching to my listening practice. I hope it does something similar for you.
You are an absolute genius, Amaya!
Total mind fuck. This is precisely how I view the world. No, my name is not Sheldon.