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.7.tar.gz (103.5 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.7-py3-none-any.whl (104.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: d3graph-2.4.7.tar.gz
  • Upload date:
  • Size: 103.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for d3graph-2.4.7.tar.gz
Algorithm Hash digest
SHA256 bad00a20b8b1a07e50d66e681bff658cc22e11737e7b3ec206df91740f315c9f
MD5 9e36ffdf0b72bdecdb1f031146a3443b
BLAKE2b-256 bb968926ee7782781198e24f8f70643eca5bba4df37d2f068f16b1fb28cabae8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: d3graph-2.4.7-py3-none-any.whl
  • Upload date:
  • Size: 104.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for d3graph-2.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4de7066123b425d687532097b4d343163062dbec1ed48cceacd699962d00e8fc
MD5 d093b82a8d399edc6bd57dbaba94d249
BLAKE2b-256 ef559c7b5d500a0fd4ce82fcea7629f35f88f84e772c0081621e53b11450d0d9

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