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.1.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for PyNetworkD3-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d91c33430deae2698c42a85bf87664ec011d6878a3e2acfdb8f5f52680a6535 |
|
MD5 | 9d10b99cf2c17c810b51e7fb7bafbd25 |
|
BLAKE2b-256 | 9cc9a94ad7e9bb9f503c28043ddc6c3c230fb9c79cfc81b5f7ece0634fe85672 |