UNKNOWN
Project description
========================
Sonnet J(SON + Net)workX
========================
Fixed initial bug with JSON production
Sonnet wraps a NetworkX graph and produces detailed JSON output for use with JavaScript to produce detailed graph visualizations in the browser.
Getting Started
---------------
Install Sonnet::
pip install sonnet
Build a NetworkX graph::
import networkx as nx
g = nx.gnp_random_graph(200, 0.5)
Wrap it with Sonnet::
import sonnet as sn
s = sn.Sonnet(g)
Build stats directly into node directory using modified NetworkX algorithms. Currently available: degree, degree_centrality, in_degree_centrality, out_degree_centrality, closeness_centrality, betweenness_centrality, eigenvector_centrality::
s.betweenness_centrality()
Find communities and assign nodes to group based on community::
s.find_communities()
Rank node size by nodes by attribute::
s.rank_nodes(rank_by='betweenness_centrality')
Now we have a nodes with lots of relevant data::
Produce JSON data::
json_graph = s.jsonify()
D3Graph
=======
D3Graph is designed to produce JSON output for D3.js graphs. It works just like Sonnet, but it has extra attributes set at during init.
Compare::
s = sn.Sonnet()
vars(s)
d = ns.D3Graph()
vars(d)
Sonnet J(SON + Net)workX
========================
Fixed initial bug with JSON production
Sonnet wraps a NetworkX graph and produces detailed JSON output for use with JavaScript to produce detailed graph visualizations in the browser.
Getting Started
---------------
Install Sonnet::
pip install sonnet
Build a NetworkX graph::
import networkx as nx
g = nx.gnp_random_graph(200, 0.5)
Wrap it with Sonnet::
import sonnet as sn
s = sn.Sonnet(g)
Build stats directly into node directory using modified NetworkX algorithms. Currently available: degree, degree_centrality, in_degree_centrality, out_degree_centrality, closeness_centrality, betweenness_centrality, eigenvector_centrality::
s.betweenness_centrality()
Find communities and assign nodes to group based on community::
s.find_communities()
Rank node size by nodes by attribute::
s.rank_nodes(rank_by='betweenness_centrality')
Now we have a nodes with lots of relevant data::
Produce JSON data::
json_graph = s.jsonify()
D3Graph
=======
D3Graph is designed to produce JSON output for D3.js graphs. It works just like Sonnet, but it has extra attributes set at during init.
Compare::
s = sn.Sonnet()
vars(s)
d = ns.D3Graph()
vars(d)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sonnet-0.1.1.tar.gz
(7.1 kB
view hashes)