Tianjian Qin

NetSpectra

Higher‑order network statistics for hybrid (farm + region) dynamic movement networks.

NetSpectra thumbnail

NetSpectra

NetSpectra is a lightweight toolkit + interactive simulator for exploring hybrid movement networks: keep farm-level detail in a focal region while contracting the rest into regional supernodes, then evaluate dynamics with higher-order statistics (temporal appearance, random-walk mass, and directed spectra).

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.

StepCommand / 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

  1. Select a focal region and choose the number of farms to simulate (≤ 100).
  2. Tune dynamics: p_keep for persistence and birth probabilities for new edges.
  3. Use the Day slider to step through the 10-day discrete-time network.
  4. Toggle Unweighted / Weighted to decide whether π‑mass and spectra use edge weights.
  5. 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 #darkmode checkbox (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.

Have a question?

Feel free to click on the button below to send me a message.

Choose Colour