osmose.trophic_network¶
Community trophic-network diagnostics from OSMOSE dietMatrix output.
Reads the per-timestep diet matrix (output/Trophic/_dietMatrix.csv), aggregates it to a species-level predator->prey network per timestep, and (via make_trophic_network_html) renders an interactive pyvis node-link graph with a FIXED layout so the graph is stable as you step through time.
The network shows DIET COMPOSITION (% of a predator’s diet), NOT consumption- weighted trophic flow; predator size-stages are averaged UNWEIGHTED to species (the ‘stage’ level keeps them split, which is exact); prey size-stages are summed to species (exact). See the design doc’s honest-limitations.
Functions
|
Sorted unique Time values in the diet matrix (slider bounds). |
|
Long |
|
Self-contained pyvis node-link HTML (fixed layout, physics off) for a diet network. |
|
All node ids (prey + predator) that can appear at any timestep, for the layout. |
|
Deterministic FIXED (x, y) per node, scaled for vis.js. |