Create D3 visualization networks with Python
Project description
PyNetworkD3
Create D3 visualization networks with Python
Installation
Install using pip
!
$ pip install pynetworkd3
Usage
To use the library, import the Graph
object directly and use the export
method
to create a .html
with the visualization.
from PyNetworkD3 import Graph
dataset = {
"nodes": [{"id": 1},{"id": 2},{"id": 3},{"id": 4},{"id": 5}],
"links": [
{"source": 1, "target": 3},
{"source": 2, "target": 3},
{"source": 1, "target": 3},
{"source": 5, "target": 3},
{"source": 4, "target": 1},
]
}
graph = Graph(dataset, width=300, height=200, radio=10, tooltip=["id"])
graph.export("output.html)
Also you can write the instance in the last line of the notebook's cell (view the example in colab) to view the visualization.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyNetworkD3-0.0.2.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for PyNetworkD3-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 639e223d7f5505ea47a3862ad726d3e8c603fc1407abdf818d5c10d166b44101 |
|
MD5 | 45c41f61823186496cc3eaaa5b51e3a7 |
|
BLAKE2b-256 | f561a1713162a5c71acd4e3ca6abb49b00faebd8db26f5ef4450304ffc1c7d3c |