Skip to main content

Create D3 visualization networks with Python

Project description

PyNetworkD3

Create D3 visualization networks with Python

PyPI - Version

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


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)

Uploaded Source

Built Distribution

PyNetworkD3-0.0.1-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page