Skip to content

Cytoscape.js graph visualization widget for the IPython Notebook

Notifications You must be signed in to change notification settings

kzuberi/ipython-cytoscape.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPython-Cytoscape.js

An interactive network visualization widget for the IPython Notebook based on the Cytoscape.js JavaScript library.

Here's a brief demo notebook.

Features

  • 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

Installation

Currently in pre-release development, install from github source.

$ pip install git+git://github.com/kzuberi/ipython-cytoscape.js#egg=ipython-cytoscape.js

Usage

Load extension in a notebook

%load_ext cyto

Specify 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()

About

Cytoscape.js graph visualization widget for the IPython Notebook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published