%global _empty_manifest_terminate_build 0 Name: python-pynetworkd3 Version: 0.0.9 Release: 1 Summary: Create D3 visualization networks with Python License: MIT URL: https://github.com/Hernan4444/PyNetworkD3 Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2d/16/be104e432409b738b225d264881683b93f3dfaacf951387a7ab526a46043/PyNetworkD3-0.0.9.tar.gz BuildArch: noarch Requires: python3-pyserial %description
Create D3 visualization networks with Python
## Installation Install using `pip`! ```sh $ pip install pynetworkd3 ``` ## Input JSON syntax ``` { "nodes": [ { "id": "id1", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, { "id": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ], "links": [ { "source": "id1", "target": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ] } ``` - Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. - Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". ## Usage To use the library, import the `Graph` object directly and use the `export` method to create a `.html` with the visualization. ```python 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 (ckeck the example in colab) to view the visualization. ## Developing This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: ```sh make get-poetry ``` Then, create a virtualenv to use throughout the development process, using: ```sh make build-env ``` Activate the virtualenv using: ```sh . .venv/bin/activate ``` Deactivate it using: ```sh deactivate ``` To add a new package, use `Poetry`: ```sh poetry addCreate D3 visualization networks with Python
## Installation Install using `pip`! ```sh $ pip install pynetworkd3 ``` ## Input JSON syntax ``` { "nodes": [ { "id": "id1", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, { "id": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ], "links": [ { "source": "id1", "target": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ] } ``` - Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. - Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". ## Usage To use the library, import the `Graph` object directly and use the `export` method to create a `.html` with the visualization. ```python 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 (ckeck the example in colab) to view the visualization. ## Developing This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: ```sh make get-poetry ``` Then, create a virtualenv to use throughout the development process, using: ```sh make build-env ``` Activate the virtualenv using: ```sh . .venv/bin/activate ``` Deactivate it using: ```sh deactivate ``` To add a new package, use `Poetry`: ```sh poetry addCreate D3 visualization networks with Python
## Installation Install using `pip`! ```sh $ pip install pynetworkd3 ``` ## Input JSON syntax ``` { "nodes": [ { "id": "id1", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, { "id": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ], "links": [ { "source": "id1", "target": "id2", "attribute 1": "value attribute 1", "attribute 2": "value attribute 2", (...) "attribute N": "value attribute N", }, (...) ] } ``` - Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. - Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". ## Usage To use the library, import the `Graph` object directly and use the `export` method to create a `.html` with the visualization. ```python 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 (ckeck the example in colab) to view the visualization. ## Developing This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: ```sh make get-poetry ``` Then, create a virtualenv to use throughout the development process, using: ```sh make build-env ``` Activate the virtualenv using: ```sh . .venv/bin/activate ``` Deactivate it using: ```sh deactivate ``` To add a new package, use `Poetry`: ```sh poetry add