Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erdogant/d3graph
Creation of interactive networks using d3 Javascript
https://github.com/erdogant/d3graph
adjacency-matrix d3-javascript d3graph d3js d3js-graph force-directed-graph graph interactive network python
Last synced: 18 days ago
JSON representation
Creation of interactive networks using d3 Javascript
- Host: GitHub
- URL: https://github.com/erdogant/d3graph
- Owner: erdogant
- License: other
- Created: 2019-12-15T10:33:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T12:54:06.000Z (5 months ago)
- Last Synced: 2024-09-19T20:10:40.738Z (about 2 months ago)
- Topics: adjacency-matrix, d3-javascript, d3graph, d3js, d3js-graph, force-directed-graph, graph, interactive, network, python
- Language: Jupyter Notebook
- Homepage: https://erdogant.github.io/d3graph
- Size: 6.97 MB
- Stars: 171
- Watchers: 7
- Forks: 25
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Interactive force-directed network creator (d3graph)
[![Python](https://img.shields.io/pypi/pyversions/d3graph)](https://img.shields.io/pypi/pyversions/d3graph)
[![Pypi](https://img.shields.io/pypi/v/d3graph)](https://pypi.org/project/d3graph/)
[![Docs](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/d3graph/)
[![LOC](https://sloc.xyz/github/erdogant/d3graph/?category=code)](https://github.com/erdogant/d3graph/)
[![Downloads](https://static.pepy.tech/personalized-badge/d3graph?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=PyPI%20downloads/month)](https://pepy.tech/project/d3graph)
[![Downloads](https://static.pepy.tech/personalized-badge/d3graph?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/d3graph)
[![License](https://img.shields.io/badge/license-BSD3-green.svg)](https://github.com/erdogant/d3graph/blob/master/LICENSE)
[![Forks](https://img.shields.io/github/forks/erdogant/d3graph.svg)](https://github.com/erdogant/d3graph/network)
[![Issues](https://img.shields.io/github/issues/erdogant/d3graph.svg)](https://github.com/erdogant/d3graph/issues)
[![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![DOI](https://zenodo.org/badge/228166657.svg)](https://zenodo.org/badge/latestdoi/228166657)
[![Medium](https://img.shields.io/badge/Medium-Blog-black)](https://towardsdatascience.com/creating-beautiful-stand-alone-interactive-d3-charts-with-python-804117cb95a7)
[![Donate](https://img.shields.io/badge/Support%20this%20project-grey.svg?logo=github%20sponsors)](https://erdogant.github.io/d3graph/pages/html/Documentation.html#)``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](https://erdogant.github.io/d3graph/pages/html/Documentation.html#medium-blog) to get a structured overview and usage of ``d3graph``.
#
### [Documentation pages](https://erdogant.github.io/d3graph/)
On the [documentation pages](https://erdogant.github.io/d3graph/) you can find detailed information about the working of the ``d3graph`` with many examples.
#
### Installation
##### Install from PyPI
```bash
pip install d3graph
```##### Import package
```python
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.](https://erdogant.github.io/hnet/pages/html/Use%20Cases.html#titanic-dataset)
##### [Example: Changing node properties](https://erdogant.github.io/d3graph/pages/html/Core%20Functionalities.html#node-label)
#
##### [Example: Convert source-target list to adjacency matrix](https://erdogant.github.io/d3graph/pages/html/Data.html#create-adjacency-matrix)
#
##### [Example: Breaking of networks using slider](https://erdogant.github.io/d3graph/pages/html/Examples.html)
### 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](https://github.com/erdogant)
* Contributions are welcome.
* If you wish to buy me a Coffee for this work, it is very appreciated :)