GitHunt
M3

m30m/network_viz

A tiny python library for visualizing word networks

Network Visualization

A tiny python library for visualizing word networks

Installation

You can install this package directly from github using the following command:

pip3 install git+https://github.com/m30m/network_viz.git

Usage

Structure of clustering input

The 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)]

API

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 svg

If 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)

Screenshots

Screenshot

Languages

HTML77.4%Python22.6%

Contributors

MIT License
Created May 24, 2018
Updated September 27, 2023
m30m/network_viz | GitHunt