NetVis is a package for interactive visualization Python NetworkX graphs within Jupyter Lab. It leverages D3.js for dynamic rendering and supports HTML export, making network analysis effortless.
Project description
netvis
NetVis is a package for interactive visualization of Python NetworkX graphs within JupyterLab. It leverages D3.js for dynamic rendering and supports HTML export, making network analysis effortless.
Version 0.4.0 introduces a MIME renderer architecture that simplifies installation and improves compatibility with modern JupyterLab environments.
Installation
You can install using pip:
pip install net_vis
Note for version 0.4.0+: The nbextension is no longer required. NetVis now uses a MIME renderer that works automatically in JupyterLab 3.x and 4.x environments.
Quick Start
This section provides a simple guide to get started with the project using JupyterLab.
Example
import net_vis
data = """
{
"nodes": [
{
"id": "Network"
},
{
"id": "Graph"
}
],
"links": [
{
"source": "Network",
"target": "Graph"
}
]
}
"""
w = net_vis.NetVis(value=data)
w
When executed, an interactive D3.js force-directed graph is displayed.
- Display Sample
Development Installation
Create a dev environment:
python -m venv venv-netvis
source venv-netvis/bin/activate
Install the Python package. This will also build the TypeScript package:
pip install -e ".[test, examples, docs]"
Install JavaScript dependencies and build the extension:
yarn install
jupyter labextension develop --overwrite .
yarn run build
Note: As of version 0.4.0, nbextension support has been removed. NetVis now exclusively uses the MIME renderer architecture for JupyterLab 3.x and 4.x.
How to see your changes
TypeScript:
If you use JupyterLab to develop, you can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
# Watch the source directory in one terminal, automatically rebuilding when needed
yarn run watch
# Run JupyterLab in another terminal
jupyter lab
After a change, wait for the build to finish and then refresh your browser and the changes should take effect.
Python:
If you make a change to the Python code, you will need to restart the notebook kernel to have it take effect.
Contributing
Contributions are welcome!
For details on how to contribute, please refer to CONTRIBUTING.md.
Special Thanks
This project was initiated on the proposal of Shingo Tsuji. His invaluable contributions —from conceptual planning to requirements definition— have been instrumental in bringing this project to fruition. We extend our deepest gratitude for his vision and support.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file net_vis-0.4.0.tar.gz.
File metadata
- Download URL: net_vis-0.4.0.tar.gz
- Upload date:
- Size: 401.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74d8630bca32dc2fef29cf9aa7059cf323bba39f910cdc07f92f31e841758a9f
|
|
| MD5 |
43bfaba31e1128c42929cc911485d725
|
|
| BLAKE2b-256 |
3215f6f76774f62fb1598bccf40ee84e941cc70505318b97ae723956d9c21599
|
Provenance
The following attestation bundles were made for net_vis-0.4.0.tar.gz:
Publisher:
release.yml on cmscom/netvis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
net_vis-0.4.0.tar.gz -
Subject digest:
74d8630bca32dc2fef29cf9aa7059cf323bba39f910cdc07f92f31e841758a9f - Sigstore transparency entry: 712846915
- Sigstore integration time:
-
Permalink:
cmscom/netvis@40eac7dd102356198e01b5008fc51aa746a1f2be -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/cmscom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40eac7dd102356198e01b5008fc51aa746a1f2be -
Trigger Event:
push
-
Statement type:
File details
Details for the file net_vis-0.4.0-py3-none-any.whl.
File metadata
- Download URL: net_vis-0.4.0-py3-none-any.whl
- Upload date:
- Size: 227.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
315930bcb7b58075d21366d0231b2510e61b2d5338cf4edf46c225f1af0e3f34
|
|
| MD5 |
d6ad5e25e9b8dc1cb8d8317fa59384aa
|
|
| BLAKE2b-256 |
2b13117e7176cb1257c5baaf56b80217d4c2f73e285d0ef43adf90fea1f83a36
|
Provenance
The following attestation bundles were made for net_vis-0.4.0-py3-none-any.whl:
Publisher:
release.yml on cmscom/netvis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
net_vis-0.4.0-py3-none-any.whl -
Subject digest:
315930bcb7b58075d21366d0231b2510e61b2d5338cf4edf46c225f1af0e3f34 - Sigstore transparency entry: 712846927
- Sigstore integration time:
-
Permalink:
cmscom/netvis@40eac7dd102356198e01b5008fc51aa746a1f2be -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/cmscom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40eac7dd102356198e01b5008fc51aa746a1f2be -
Trigger Event:
push
-
Statement type: