home ¦ Archives ¦ Atom ¦ RSS > Category: discogs

Discogs Data SQL Views

This sat in the drafts folder for a bit, but I finally decided to just hit publish and stop seeking perfection.

Well that was a mildly annoying adventure discovering how to get code syntax highlighting working. Pelican’s markdown support includes CodeHilite by default but I couldn’t figure out how to actually trigger. Turns out once I installed the Pygments module, things kicked in.

Anyway, who knew the language of the first code segment to appear on this blog would be SQL? Using some handy regular expression features of Postgres, I layered some views on top of data imported from discogs-xml2db. The target was getting an extraction of releases from the Fabric and FabricLive series. Still a fair amount of data normalization needed to be done, but at least I’ve got 100% recall with not too much extra stuff and that’s only because the titles aren’t quite consistent. Ultimately had to resort to explicitly black listing some rows

Code and example output below the fold

read more ...


Discogs and Data

For the longest time, I’ve just been piling up data from Discogs.com and not really doing anything with it. Finally, I have a motivating project.

The fine folks at London’s Fabric nightclub have two great series of DJ mix releases, Fabric and FabricLive. Recently I made a bulk purchase of digital versions of 20 mixes. They arrived as .wav files with no metadata attached (that I can tell). Adding all the track metadata is something a computer should do, not a human. No problem, all of that data should be in the Discogs data. I’d also like to create playlists or a playlist DB to start noodling around with MPD as a playlist shuffling jukebox. (Why does the world hate playlists so much?).

So of course this means lots of data munging, wrangling, and management. Which is totally fine. I need some data side projects to help build a data portfolio.

Link parkin’ discogs-xml2db v2 as the way to get the Discogs data into a PosgreSQL db for querying.

© 2008-2024 C. Ross Jam. Built using Pelican. Theme based upon Giulio Fidente’s original svbhack, and slightly modified by crossjam.