Network-visualization toolkit for analyzing and visualizing complex networks.
Reason this release was yanked:
old
Project description
netviz_tools
Network visualization toolkit for FAOSTAT potato-trade data (2012–2022).
netviz_tools provides:
- DataManager: Load, clean, and cache FAOSTAT node/edge data
- TradeNetwork: Build NetworkX graphs, compute metrics, and export interactive Plotly JSON (networks, Sankeys, geo-maps)
- TradeSeries: Generate and plot multi-year network statistics
- Utilities: JSON exporters and shared constants (e.g., continent colors)
📦 Installation
# From PyPI
pip install netviz_tools
# Or, for local development
git clone https://github.com/yourusername/netviz_tools.git
cd netviz_tools
python -m venv .venv
source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -e .[dev]
(The [dev] extra pulls in testing tools like pytest.)
🚀 Quick Start
from netviz_tools import DataManager
# 1. Point at your raw or merged data folder
dm = DataManager(root="path/to/your/data")
# 2. Build a network for year & item
net = dm.get_network(year=2020, item="potatoes")
# 3. Export an interactive network JSON
net.plot_interactive(top_n=20, json_path="exports/json/net_2020_potatoes.json")
# 4. Make a Sankey JSON
net.plot_sankey(top_n=10, json_path="exports/json/sankey_2020_potatoes.json")
# 5. Geo-map JSON
net.plot_geo(top_n=50, json_path="exports/json/geo_2020_potatoes.json")
📚 Documentation
Detailed docs and examples in the docs/ folder (or readthedocs once published).
🛠️ Development
- Create a virtualenv (see Installation above).
- Install dev requirements:
pip install -e .[dev]
- Run tests:
pytest
- Build distribution:
python -m build
- Publish:
twine upload dist/*
🤝 Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes
- Open a Pull Request
Please follow the existing code style and write tests for new functionality.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 netviz_tools-2025.0.2.tar.gz.
File metadata
- Download URL: netviz_tools-2025.0.2.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf35769469960b69c3a40f33ae11ea03c8ff27ee66799468c5cc036a55a7508
|
|
| MD5 |
3b88b26b8635dfe3d6066b849f16c129
|
|
| BLAKE2b-256 |
6fefe2c62fd13ffbc3df19e85a34ff348306feb91d172259841676baf1b6cacf
|
File details
Details for the file netviz_tools-2025.0.2-py3-none-any.whl.
File metadata
- Download URL: netviz_tools-2025.0.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
810631175ce4beda74276e5f43a7540c27eac15be572412dfd7919cc29981733
|
|
| MD5 |
3e12b783df17852c8109f6a7d1773e6e
|
|
| BLAKE2b-256 |
d5a36a50143d92b7b9b394a225fa8d365108527ca4048527ebf79c0c021f8e6e
|