d3graph


Named3graph JSON
Version 2.5.0 PyPI version JSON
download
home_pagehttps://erdogant.github.io/d3graph
SummaryPython package to create interactive network based on d3js.
upload_time2023-11-12 15:12:28
maintainer
docs_urlNone
authorErdogan Taskesen
requires_python>=3
license
keywords
VCS
bugtrack_url
requirements colourmap ismember jinja2 markupsafe networkx numpy packaging pandas python-louvain datazets
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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#)
<!---[![BuyMeCoffee](https://img.shields.io/badge/buymea-coffee-yellow.svg)](https://www.buymeacoffee.com/erdogant)-->
<!---[![Coffee](https://img.shields.io/badge/coffee-black-grey.svg)](https://erdogant.github.io/donate/?currency=USD&amount=5)-->


``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)

<p align="left">
  <a href="https://erdogant.github.io/docs/d3graph/titanic_example/index.html">
     <img src="https://github.com/erdogant/d3graph/blob/master/docs/titanic_example/d3graph.png" width="600"/>
  </a>
</p>


##### [Example: Changing node properties](https://erdogant.github.io/d3graph/pages/html/Core%20Functionalities.html#node-label)

<p align="left">
  <a href="https://erdogant.github.io/d3graph/pages/html/Core%20Functionalities.html#node-label">
     <img src="https://github.com/erdogant/d3graph/blob/master/docs/figs/d3graph_node_properties.png" width="900"/>
  </a>
</p>

#

##### [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)


<p align="left">
  <a href="https://erdogant.github.io/d3graph/pages/html/Examples.html">
    <img src="https://github.com/erdogant/d3graph/blob/master/docs/figs/d3graph example.png" width="600"/>
  </a>
</p>

<hr>

### 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 <a href="https://erdogant.github.io/donate/?currency=USD&amount=5">Coffee</a> for this work, it is very appreciated :)

            

Raw data

            {
    "_id": null,
    "home_page": "https://erdogant.github.io/d3graph",
    "name": "d3graph",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "",
    "author": "Erdogan Taskesen",
    "author_email": "erdogant@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/6e/8079430e8142843c536c3fdbc6d49fd54f97083926ca24557e1d97b02429/d3graph-2.5.0.tar.gz",
    "platform": null,
    "description": "# Interactive force-directed network creator (d3graph)\r\n\r\n[![Python](https://img.shields.io/pypi/pyversions/d3graph)](https://img.shields.io/pypi/pyversions/d3graph)\r\n[![Pypi](https://img.shields.io/pypi/v/d3graph)](https://pypi.org/project/d3graph/)\r\n[![Docs](https://img.shields.io/badge/Sphinx-Docs-Green)](https://erdogant.github.io/d3graph/)\r\n[![LOC](https://sloc.xyz/github/erdogant/d3graph/?category=code)](https://github.com/erdogant/d3graph/)\r\n[![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)\r\n[![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)\r\n[![License](https://img.shields.io/badge/license-BSD3-green.svg)](https://github.com/erdogant/d3graph/blob/master/LICENSE)\r\n[![Forks](https://img.shields.io/github/forks/erdogant/d3graph.svg)](https://github.com/erdogant/d3graph/network)\r\n[![Issues](https://img.shields.io/github/issues/erdogant/d3graph.svg)](https://github.com/erdogant/d3graph/issues)\r\n[![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\r\n[![DOI](https://zenodo.org/badge/228166657.svg)](https://zenodo.org/badge/latestdoi/228166657)\r\n[![Medium](https://img.shields.io/badge/Medium-Blog-black)](https://towardsdatascience.com/creating-beautiful-stand-alone-interactive-d3-charts-with-python-804117cb95a7)\r\n[![Donate](https://img.shields.io/badge/Support%20this%20project-grey.svg?logo=github%20sponsors)](https://erdogant.github.io/d3graph/pages/html/Documentation.html#)\r\n<!---[![BuyMeCoffee](https://img.shields.io/badge/buymea-coffee-yellow.svg)](https://www.buymeacoffee.com/erdogant)-->\r\n<!---[![Coffee](https://img.shields.io/badge/coffee-black-grey.svg)](https://erdogant.github.io/donate/?currency=USD&amount=5)-->\r\n\r\n\r\n``d3graph`` is a python package that simplifies the task of creating **interactive** and **stand-alone** networks in **d3 javascript** using **python**.\r\nFor 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!\r\n\r\nThis 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. \r\n\r\n\r\n\r\n# \r\n**\u2b50\ufe0f Star this repo if you like it \u2b50\ufe0f**\r\n#\r\n\r\n### Blogs\r\n\r\nRead 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``.\r\n\r\n\r\n\r\n# \r\n\r\n### [Documentation pages](https://erdogant.github.io/d3graph/)\r\n\r\nOn the [documentation pages](https://erdogant.github.io/d3graph/) you can find detailed information about the working of the ``d3graph`` with many examples. \r\n\r\n# \r\n\r\n### Installation\r\n\r\n##### Install from PyPI\r\n\r\n```bash\r\npip install d3graph\r\n```\r\n\r\n##### Import package\r\n\r\n```python\r\nfrom d3graph import d3graph\r\n```\r\n\r\n# \r\n\r\n### Examples\r\n\r\nClick 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)\r\n\r\n<p align=\"left\">\r\n  <a href=\"https://erdogant.github.io/docs/d3graph/titanic_example/index.html\">\r\n     <img src=\"https://github.com/erdogant/d3graph/blob/master/docs/titanic_example/d3graph.png\" width=\"600\"/>\r\n  </a>\r\n</p>\r\n\r\n\r\n##### [Example: Changing node properties](https://erdogant.github.io/d3graph/pages/html/Core%20Functionalities.html#node-label)\r\n\r\n<p align=\"left\">\r\n  <a href=\"https://erdogant.github.io/d3graph/pages/html/Core%20Functionalities.html#node-label\">\r\n     <img src=\"https://github.com/erdogant/d3graph/blob/master/docs/figs/d3graph_node_properties.png\" width=\"900\"/>\r\n  </a>\r\n</p>\r\n\r\n#\r\n\r\n##### [Example: Convert source-target list to adjacency matrix](https://erdogant.github.io/d3graph/pages/html/Data.html#create-adjacency-matrix)\r\n\r\n#\r\n\r\n##### [Example: Breaking of networks using slider](https://erdogant.github.io/d3graph/pages/html/Examples.html)\r\n\r\n\r\n<p align=\"left\">\r\n  <a href=\"https://erdogant.github.io/d3graph/pages/html/Examples.html\">\r\n    <img src=\"https://github.com/erdogant/d3graph/blob/master/docs/figs/d3graph example.png\" width=\"600\"/>\r\n  </a>\r\n</p>\r\n\r\n<hr>\r\n\r\n### Contribute\r\n* All kinds of contributions are welcome!\r\n\r\n### Citation\r\nPlease cite d3graph in your publications if this is useful for your research. See column right for citation information.\r\n\r\n### Maintainer\r\n* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)\r\n* Contributions are welcome.\r\n* If you wish to buy me a <a href=\"https://erdogant.github.io/donate/?currency=USD&amount=5\">Coffee</a> for this work, it is very appreciated :)\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python package to create interactive network based on d3js.",
    "version": "2.5.0",
    "project_urls": {
        "Download": "https://github.com/erdogant/d3graph/archive/2.5.0.tar.gz",
        "Homepage": "https://erdogant.github.io/d3graph"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "651cf0259ca9bf975837af9c63ec9f030279d81e42867f9b26e3badf6afdc1d4",
                "md5": "f652a2f92b95be74bfc64f1805712721",
                "sha256": "732f5170f17743bd04eeeb58286e277822bfb60379a68b92080c11be2da9bb86"
            },
            "downloads": -1,
            "filename": "d3graph-2.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f652a2f92b95be74bfc64f1805712721",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 126428,
            "upload_time": "2023-11-12T15:12:25",
            "upload_time_iso_8601": "2023-11-12T15:12:25.729467Z",
            "url": "https://files.pythonhosted.org/packages/65/1c/f0259ca9bf975837af9c63ec9f030279d81e42867f9b26e3badf6afdc1d4/d3graph-2.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d76e8079430e8142843c536c3fdbc6d49fd54f97083926ca24557e1d97b02429",
                "md5": "1b2d26dbd06999e323eb77a597aecdc5",
                "sha256": "ef410950cb24d54c8c9a7e51cf084e4235b2d60df0aceee3cf9cec87ee3ef2c2"
            },
            "downloads": -1,
            "filename": "d3graph-2.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1b2d26dbd06999e323eb77a597aecdc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 124018,
            "upload_time": "2023-11-12T15:12:28",
            "upload_time_iso_8601": "2023-11-12T15:12:28.054159Z",
            "url": "https://files.pythonhosted.org/packages/d7/6e/8079430e8142843c536c3fdbc6d49fd54f97083926ca24557e1d97b02429/d3graph-2.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-12 15:12:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "erdogant",
    "github_project": "d3graph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "colourmap",
            "specs": []
        },
        {
            "name": "ismember",
            "specs": []
        },
        {
            "name": "jinja2",
            "specs": []
        },
        {
            "name": "markupsafe",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    ">",
                    "2"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "packaging",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "python-louvain",
            "specs": []
        },
        {
            "name": "datazets",
            "specs": []
        }
    ],
    "lcname": "d3graph"
}
        
Elapsed time: 0.29680s