SQL Zone is brought to you in partnership with:

Alec is a Content Curator at DZone. He lives in Raleigh and spends his free time writing and programming. Alec is a DZone Zone Leader and has posted 524 posts at DZone. You can read more from them at their website. View Full User Profile

SQL & Python: Analyzing 8 Years of Last.fm Data

04.12.2014
| 3482 views |
  • submit to reddit

Hey, MongoDB isn't the only thing you can use to crunch huge volumes of data (and neither is PostgreSQL, for that matter). In this recent post, Matthew Lewis has taken to his Last.fm data (eight years of it) with a Python script and a SQLite database, and it looks like an enjoyable activity for anybody interested in simultaneously playing with a database and reliving the musical horrors of his or her youth. Lewis, for example, made a few notable discoveries:

...I ran some queries to search for songs I played obsessively after I discovered them, and I found several of my music-listening phases, such as:

  • that period during which I listened exclusively to "Weird Al" Yankovic,
  • the landmark date in 2006 when I listened to Daft Punk's Discovery for the first time, and
  • that time I saw Wicked with my high school band and listened to the soundtrack for a week straight.

He also points to all the tools he used to do this, including the Python work, and provides his own SQLite database of results for download. Check out the full post for more details on how to use Python, SQLite, and Last.fm to learn your own embarassing secrets!