Discogsgrapher generates a graph of from the artist/label connections of a certain style from the Discogs database.
This information is parsed from the releases.xml file of a Discogs data dump and creates a graph from the information in the following manner:
- Go through all the releases and find the ones that belong to the style in question and fit within the other parameters.
- Go through these artists and the labels that they have released music on.
- If two artists have released music on the same label consider them connected, if they have both released music on more than one label increase the weight of their connection.
pip install requirements.txt(if don't like to be messy you might want to create an environment for this project)
Download the releases part of a Discogs data dump
python discogsgrapher.pywith the following parameters:
-x /full/path/to/discogs/data/dump/release.xml -s the style that you want to parse a network for -t the treshold (minum number of releases) that artists must have in this style to be included -c the country of the releases -b the year you want to begin parsing from -e the year you want to end the parsing on
Wait! The relases file is big (~12 gb) and this might take a while (about an hour on my admittely ancient Macbook)
You should now have a
.jsonfile that you can vizualize with D3