Graph-ARI
Graph-ARI (graphari) provides weekly mortality and climate data for Mexico,
municipal graphs, and seven neural networks behind one training API. Explore
2,478 municipalities, train at municipality/state/national level, or reproduce
the supplied forecast comparisons without training a model.
Start here: Reader guide · API reference · Notebook index
Choose a reading path
| I want to… | Read | Run |
|---|---|---|
| Understand the data and graphs | Data and graphs | Visualize |
| Train and use a neural network | Training | Seven model notebooks |
| Reproduce manuscript tables and figures | Reproducibility | Saved results |
For a first visit, follow the six chapters in order.
Install Graph-ARI 2.0.1
python -m pip install "graphari==2.0.1"
# For neural-network training and notebook execution:
python -m pip install "graphari[training,notebook]==2.0.1"
Version 2 adds the graph wrapper, optional native cuGraph operations, and the unified forecasting API. Read the release notes for migration from version 1.
For the saved forecast archive, all notebooks, and editable development, use a full source checkout:
git clone https://github.com/AlessandroMilan/Graph-ARI.git
cd Graph-ARI
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[notebook]'
Python 3.10+ supports the base package. Python 3.12 is the tested environment.
The base installation works on CPU without PyTorch or NVIDIA libraries. See
getting started for Windows activation, training,
optional GPU support, and interactive JupyterLab installation. The notebook
extra supplies execution tools; it does not install JupyterLab.
A first graph
import graphari as ga
graph = ga.build_graph(week="2025/53", backend="networkx")
features, municipality_ids = ga.get_node_feature_matrix(graph)
edge_index = ga.get_edge_index(graph, municipality_ids)
print(graph.number_of_nodes(), graph.number_of_edges()) # 2478 7203
print(features.shape, edge_index.shape) # (2478, 5) (2, 14406)
The Graph wrapper supports inspection, subgraphs, ego networks, and conversion. Native NVIDIA cuGraph topology is optional; NetworkX supplies the CPU backend. PyTorch training devices are independent of graph-backend selection.
A first forecast
Install the training dependencies. Then all seven models use the same interface:
import graphari as ga
options = ga.LoadDefaults("GCN Conv", "State", "H", 12)
model = ga.Forecaster(**options).fit()
print(model.forecast()) # 12 future leads × 32 states
print(model.evaluate()) # Held-out consensus metrics, rounded to 2 decimals.
This preset allows up to 250 epochs. Begin with a short training check before a full run. H includes weather; MOH omits it. Available models are Dense, LSTM, GCN Conv, GraphSAGE, ASTGCN, Graph-ARI (Graph WaveNet), and TCN.
Reproduce saved results
From the repository root after installing .[notebook]:
python scripts/validate_results.py --results-dir results/reproducibility-reader
This scores the 210 saved forecasts, verifies all 30 observation tables against bundled data, and generates numerical tables plus seven PDF/600 dpi PNG figures. It needs neither training dependencies nor a GPU. The reproducibility chapter maps outputs to manuscript tables and figures and explains comparison rules and limitations.
Repository map
| Directory | Contents |
|---|---|
| docs | Ordered guide and public API reference |
| graphari | Package and bundled input CSVs |
| notebooks | Data walkthrough, results reproduction, seven training notebooks |
| forecasts | 240 original CSVs: 210 forecasts and 30 observations, about 953 MB |
| scripts | Fresh-kernel notebook validators |
| tests | Data, backend, training, evaluation, and reporting checks |
Training inputs ship with the wheel. Saved forecasts, guides, and notebooks are available in the repository and source distribution. Generated results and local build artifacts are ignored by Git.
See validation commands and the tested CUDA training environment. Report problems through GitHub Issues. Code is licensed under GPL-3.0-or-later.
Metadata
Release files for graphari 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| graphari-2.0.1.tar.gz | 102.8 MB | Without provenance | Details for graphari-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graphari-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for graphari-2.0.1-py3-none-any.whl |
Total release size: 152.4 MB
Release files / graphari-2.0.1.tar.gz
| Download URL | graphari-2.0.1.tar.gz |
|---|---|
| Size | 102.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7321c133ce11b828bc7b1725a3560117dd0341ff26badffc596ae4539b60a8e8
|
|
BLAKE2b-256 checksum How to use checksums |
9bbedb284e167cd7ad8bfd74e0fabdd41488b1a11d3aae3eb3b3871880426eaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / graphari-2.0.1-py3-none-any.whl
| Download URL | graphari-2.0.1-py3-none-any.whl |
|---|---|
| Size | 49.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddd3ca9722f5de172bfc9197e0a4e5e48412b93d68eccee40f646367c9e9093d
|
|
BLAKE2b-256 checksum How to use checksums |
14165c742ee737d062523e240780b8c3b94b0d4e63d07e5c1fb32c169ba7a758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for graphari 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.