Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Create a graph of memberships and collaborations from a musical movement using Networkx and ipysigma

License

PabloVD/BandGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BandGraph

License: MIT

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

Jazz

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 [email protected].

License

MIT

About

Create a graph of memberships and collaborations from a musical movement using Networkx and ipysigma

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages