osmose.analysis

Ensemble statistics and ecological indicators for OSMOSE outputs.

Functions

biomass_long(results)

Normalize a run's biomass output to long form: columns time, species, value.

ensemble_stats(replicate_dfs, value_col[, ...])

Compute mean, std, 95% CI across replicate DataFrames.

format_delta_report(deltas, *[, metric, ...])

Markdown table of per-species deltas, ranked (as returned by run_delta).

mean_tl_catch(yield_df, tl_df)

Compute weighted mean trophic level of catch per timestep.

run_delta(baseline, variant, *[, metric, ...])

Per-species delta of metric (windowed mean) between two runs, ranked by |% change|.

shannon_diversity(biomass_df)

Compute Shannon-Wiener diversity index per timestep.

size_spectrum_slope(spectrum_df)

Compute log-log regression slope of size spectrum.

summary_table(replicate_dfs, value_col)

Per-species summary statistics across replicates.

Classes

SpeciesDelta(species, baseline_mean, ...)