![]() ![]() ![]() I predominately listen to artists from the populated areas of the U.S. Click any point in the map below to see a list of artists from there: ![]() I also converted these points to GeoJSON to produce an interactive Leaflet web map of the artists I listen to (see this previous post for more on exporting pandas DataFrames to GeoJSON). Finally I mapped these points in Python with matplotlib basemap: Next I geocoded these place names to latitude-longitude using the Nominatim and Google APIs. Then I recursively queried the place until I got a full place name, like “Brixton, London, England, UK” (this process takes a while, and is perfectly suited to run on a Raspberry Pi!). To do this, I took each artist ID in the Last.fm data set and passed it to the Musicbrainz API to get full artist details. I also mapped all the artists I’ve listened to. This includes pretty close to every song I’ve played on anything other than vinyl during that time. I’ve listened to 26,761 different artists and 66,377 different songs across 38,026 different albums from when I first started using iTunes circa 2005 through the present day. Across the dataset, I have 279,769 scrobbles (aka, song plays). All you need is an API key.įirst I visualized my most-played artists, above. All of my code used to do this is available in this GitHub repo, and is easy to re-purpose for exploring your own Last.fm history. Using Python, pandas, matplotlib, and leaflet, I downloaded my listening history from Last.fm’s API, analyzed and visualized the data, downloaded full artist details from the Musicbrainz API, then geocoded and mapped all the artists I’ve played. I’ve been using Last.fm for nearly 10 years now, and my tracked listening history goes back even further when you consider all my pre-existing iTunes play counts that I scrobbled (ie, submitted to my Last.fm database) when I joined Last.fm. Last.fm is a web site that tracks your music listening history across devices (computer, phone, iPod, etc) and services (Spotify, iTunes, Google Play, etc). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |