An interactive network visualization widget for the IPython Notebook based on the Cytoscape.js JavaScript library.
Here's a brief demo notebook.
- Create network visualizations from interactions specified in Pandas DataFrames
- Control visual features like graph layout, node & edge colors, node shapes, etc
- Interact with graph by selecting & moving nodes, panning & zooming the view
- Convert graph to a png image for static display or inclusion in other documents
- Save the graph to the notebook allowing the graph to be displayed in nbviewer including manual layout tweaks without an ipython backend, and still be interacted with by the viewer
Currently in pre-release development, install from github source.
$ pip install git+git://github.com/kzuberi/ipython-cytoscape.js#egg=ipython-cytoscape.jsLoad extension in a notebook
%load_ext cytoSpecify interactions to create a graph
import pandas as pd
nodes = pd.read_csv('/path/to/nodes.csv')
edges = pd.read_csv('/path/to/edges.csv')
network = cyto.Network(nodes, edges, layout='circle')Click and drag nodes as needed, save result to a png
graph.snapshot()
graph.show_snapshot()Save current widget state to notebook
graph.save_state()