A versatile network data visualization and analysis toolkit
Project description
netviz_tools
A versatile network data visualization and analysis toolkit.
netviz_tools provides:
- DataManager: Load, clean, transform, and analyze network data from various sources
- NetworkManager: Build NetworkX graphs, compute network metrics, and create interactive visualizations
- TimeSeries: Analyze temporal patterns and generate time series plots of network metrics
- Utilities: Helper functions and constants for visualization and data export
📦 Installation
# From PyPI
pip install netviz_tools
# Or, for local development
git clone https://github.com/tyson-j/netviz_tools.git
cd netviz_tools
python -m venv .venv
source .venv/bin/activate # Linux/macOS
# For 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, NetworkManager
# 1. Load data from CSV files
dm = DataManager(
nodes_path="path/to/nodes.csv",
edges_path="path/to/edges.csv"
)
# 2. Clean and prepare the data
dm.clean_data()
dm.data_summary() # Print summary of the loaded data
# 3. Convert to NetworkX graph
G = dm.to_networkx(directed=True)
# 4. Filter data by year if needed
if dm.has_year:
year = dm.available_years[0] # Take the first available year
filtered_dm = dm.filter_by_year(year)
G = filtered_dm.to_networkx()
# 5. Analyze network statistics
stats = dm.network_stats()
# 6. Save processed data if needed
dm.save_data(format='csv')
# 7. When NetworkManager is fully implemented:
# network = NetworkManager(G)
# network.plot_interactive(json_path="output/network.json")
📚 Documentation
Detailed documentation and examples are available in the docs/ folder. Key components:
- DataManager: The primary data handling class that loads, cleans, and transforms network data
- NetworkManager: For network visualization and metric calculation (coming soon)
- TimeSeries: For time-based network analysis (coming soon)
For API documentation, see the Python module docs.
✨ Features
- Flexible Data Import: Load network data from CSV, JSON, Excel files, pandas DataFrames, or NetworkX graphs
- Data Preprocessing: Automatic cleaning, normalization, and detection of key attributes
- Time-Series Support: Analyze how networks evolve over time with built-in year detection and filtering
- Graph Conversion: Seamless conversion between data formats and NetworkX graph objects
- Network Analysis: Calculate and visualize network metrics and properties
- Interactive Visualization: Generate rich, interactive visualizations (with full implementation of NetworkManager)
🛠️ 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 (coming soon)
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes
- Add tests for any new functionality
- Ensure all tests pass (
pytest) - Open a Pull Request
Please follow the existing code style and include documentation for new features.
📄 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-0.1.2.tar.gz.
File metadata
- Download URL: netviz_tools-0.1.2.tar.gz
- Upload date:
- Size: 78.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f4e877c58e0463c7e1a887df285cb11e8f8453a3a654987325c9bf5ec49e0b
|
|
| MD5 |
64f64a51d9fba010b3b837982688991a
|
|
| BLAKE2b-256 |
753d893da57c1fe60b732cf396174126aad33f93695089fedbe64e6059b57b5a
|
File details
Details for the file netviz_tools-0.1.2-py3-none-any.whl.
File metadata
- Download URL: netviz_tools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 80.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c82a662cbdd4a4440ec8f1bf247c6b626c317097978647849e19a78ee23eeff
|
|
| MD5 |
9a2f1a1d1c052cef191d00517f1956cc
|
|
| BLAKE2b-256 |
e4f1c638a24df5ab1999f2daf3630b3386fd22a42a68fd74d52b2c1c4ce8ef25
|