Skip to main content

Python package to create interactive network based on d3js.

Project description

Interactive force-directed network creator (d3graph)

Python Pypi Docs LOC Downloads Downloads License Forks Issues Project Status DOI Medium Donate

d3graph is a python package that simplifies the task of creating interactive and stand-alone networks in d3 javascript using python. For this package I was inspired by d3 javascript examples but there was no python package that could create such interactive networks. Here it is; a library that automatically creates D3 javascript and HTML code based on an input adjacency matrix in python! This library does not require you any additional installation, downloads or setting paths to your systems environments. You just need python and this library. All other is taken care off. Huray!

This library will create an interactive and stand-alone network that is build on d3 javascript. d3graph only requirs an adjacency matrix in the form of an pandas dataframe. Each column and index name represents a node whereas values >0 in the matrix represents an edge. Node links are build from rows to columns. Building the edges from row to columns only matters in directed cases. The network nodes and edges can be adjusted in weight, color etc, based on user defined paramters.

⭐️ Star this repo if you like it ⭐️

Blogs

Read the blog Creating beautiful stand-alone interactive D3 charts with Python to get a structured overview and usage of d3graph.

Documentation pages

On the documentation pages you can find detailed information about the working of the d3graph with many examples.

Installation

Install from PyPI
pip install d3graph
Import package
from d3graph import d3graph

Examples

Click on the following image to load the interactive Titanic network that is created with d3graph. Note that the relations are determined using HNet. Click here to go to the page with code to make the network.

Example: Changing node properties

Example: Convert source-target list to adjacency matrix

Example: Breaking of networks using slider


Contribute

  • All kinds of contributions are welcome!

Citation

Please cite d3graph in your publications if this is useful for your research. See column right for citation information.

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

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

d3graph-2.4.5.tar.gz (102.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

d3graph-2.4.5-py3-none-any.whl (102.9 kB view details)

Uploaded Python 3

File details

Details for the file d3graph-2.4.5.tar.gz.

File metadata

  • Download URL: d3graph-2.4.5.tar.gz
  • Upload date:
  • Size: 102.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.5

File hashes

Hashes for d3graph-2.4.5.tar.gz
Algorithm Hash digest
SHA256 50a6abb1e9325d2effa1391a323c76a5e84b03bb32a03ffbf1da97dbb7258cf7
MD5 a99836f3010ed312573db8883b053504
BLAKE2b-256 ab71b1223680f720b95b8419c71371d8c124e3f951464787eac6f06de24d48ec

See more details on using hashes here.

File details

Details for the file d3graph-2.4.5-py3-none-any.whl.

File metadata

  • Download URL: d3graph-2.4.5-py3-none-any.whl
  • Upload date:
  • Size: 102.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.5

File hashes

Hashes for d3graph-2.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e09b9dbb59884fe8d75863873dff9373c1f47a43217220e4b8d48ba99194371f
MD5 c6875162287f6be53e447cca9c3c23a6
BLAKE2b-256 f1499d047e07a7ae912058fe579c132b63d63a95be404bfc84249596a3094817

See more details on using hashes here.

Supported by

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