NetSpectra
Higher‑order network statistics for hybrid (farm + region) dynamic movement networks.
What it does
NetSpectra proposes a hybrid dynamic graph for movement/trade networks: preserve farm-level resolution inside a chosen focal region, while contracting everything outside into regional supernodes and superflows. This keeps local detail where it matters, without losing a coherent national context.
- TEA / TNA — temporal appearance of edges/nodes (new/reactivated/persistent/churn).
- π‑mass — where a random walk “spends time” (Farm vs Region mass on the LIC).
- Magnetic Laplacian spectra — directed spectral signatures that keep flow directionality.
For formal definitions and interpretation guidelines, see the blog post.
Quickstart
The simulator is a static HTML app (D3 + Web Worker). Run it from a local server so browser fetch calls work.
| Step | Command / Action |
|---|---|
| 1 | git clone https://github.com/EvoLandEco/netspectra.git |
| 2 | cd netspectra && python -m http.server 8000 |
| 3 | Open http://localhost:8000/simulator/hybrid_simulator_V10.html |
Ensure the GeoJSON files are available at the expected paths (or edit the fetch paths in the simulator):
nl_corop.geojson and nl_corop_labelpoint.geojson.
How to use
- Select a focal region and choose the number of farms to simulate (≤ 100).
- Tune dynamics: p_keep for persistence and birth probabilities for new edges.
- Use the Day slider to step through the 10-day discrete-time network.
- Toggle Unweighted / Weighted to decide whether π‑mass and spectra use edge weights.
- Use Spectrum quality (Fast / Balanced / Full) to trade speed for fidelity.
The bottom-left status badge in the map panel shows build progress; hover it to reveal a cancel action.
Embedding
NetSpectra is designed to embed cleanly in articles and documentation. It supports:
- Automatic iframe height resizing via iframe-resizer.
- Dark-mode synchronization with a site-level
#darkmodecheckbox (if present).
See the example usage in: the blog post.
Roadmap
- Faster directed spectral solvers (top‑k eigensolvers / WASM backends).
- Additional higher‑order temporal statistics and diagnostics.
- Drop-in support for other regional maps and projections.
- Weighted TEA/TNA variants for high-frequency movement systems.