BandGraph
Description
Given a list of bands and artists belonging to a musical movement, create a graph of memberships and collaborations using networkx and render interactively with ipysigma.
Data is is stored as text files with several rows, each of them with the following format: band;members;collaborations. members and collaborations are lists of musicians or bands separated by commas ,. collaborations includes collaborations between bands and musicians from other projects, and also between bands in songs or split albums. Most of info has been extracted from Wikipedia, Discogs, Rate Your Music, Spotify and other sources.
See a web application with examples here.
Installation
To install the library, run:
pip install bandgraph
Get started
Load the data
from bandgraph import load_data
filename = "jazz.txt"
dataframe = load_data(filename)
Generate the graph
from bandgraph import create_graph
graph = create_graph(dataframe)
Render the graph with ipysigma
from ipysigma import Sigma
args = {"node_size":0,
"node_color":"type",
"edge_color":"type",
"label_density":10,
"node_border_color_from":"node",
"start_layout":2,
"hide_info_panel":True,
"background_color":"rgb(255, 255, 255)"}
sig = Sigma(graph, **args)
Examples
See a web application with examples here.
Example graph, showing the Jazz scene
To do
- Improve graph visualization, using
ipysigma - Create web application
- Fix visualization of webpage in mobile phone
- Create library and publish in pypi
- Improve colors and visualization
- Write web scrapping tool to parse data from Rate Your Music and/or Wikipedia.
Contributing
If you want to include new data or have comments or suggestions, feel free to create a pull request or contact me at pablo.villanueva.domingo@gmail.com.
License
MIT
Metadata
Release files for bandgraph 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bandgraph-0.1.1.tar.gz | 949.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bandgraph-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 953.3 kB
Release files / bandgraph-0.1.1.tar.gz
| Download URL | bandgraph-0.1.1.tar.gz |
|---|---|
| Size | 949.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78f2d27fe7fa8a602e0338af19a02bb666147781358e3358a61e14ebadb955ac
|
|
BLAKE2b-256 checksum How to use checksums |
2a40d3a186934aff9c7f33012240099257dd06402304ab02785adaad17443a9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / bandgraph-0.1.1-py3-none-any.whl
| Download URL | bandgraph-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f3b762469378c67422eadc724f345c9b7e8a20220527a5eccff6f807e42ffc7
|
|
BLAKE2b-256 checksum How to use checksums |
b82545e971063d1213212171b087135044376a576c1a64cb109388ab01c20002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|