A tiny python library for visualizing word networks
You can install this package directly from github using the following command:
pip3 install git+https://github.com/m30m/network_viz.gitThe input is a list of 3-tuples. The first and the second ones are nodes and the third one is weight;
[('node-1', 'node-2', 0.5), ('node-1', 'node-3', 0.7), ('node-2', 'node-2', 0.3)]If you are using jupyter notebook:
from network_viz import visualize_notebook
visualize_notebook(edges, size=900) # size parameter is the width and height of output svgIf you want the raw html:
from network_viz import visualize
html = visualize(clusters, size=900)
with open('output.html','w') as output_file:
output_file.write(html)