Skip to content

Reporting

Self-contained HTML report and matching CSV bundle export. Column dictionary: Report Export Columns.

AOI boundary maps

When generate_catchment_report receives aoi_context, the self-contained HTML embeds a compact Leaflet runtime and boundary GeoJSON. The boundary remains readable without tiles. The basemap is deliberately not embedded: viewing the report requests online topographic tiles (Esri World Topo Map / OpenStreetMap) and therefore needs an internet connection; a tile failure only exposes the offline notice and does not affect report content. aoi_context geometry may be simplified for display and must not be treated as the analysed footprint.

generate_catchment_report(..., aoi_context=None) preserves existing map-free reports. CatchmentReportPaths returns six paths: the five report artifacts (HTML, monthly CSV, hydrological-years CSV, wet-events CSV, and low-spells CSV) plus the manifest JSON path.

Reports display public results derived under the runtime decision_policy value hydroseason_0_2_0.

hydroseason.report

Public report APIs for self-contained HydroSeason manager bundles.

CatchmentReportPaths dataclass

Paths written by :func:generate_catchment_report.

events_csv property

events_csv: Path

Backward-compatible alias for :attr:wet_event_csv.

generate_catchment_report

generate_catchment_report(extent: Any, output_dir: str | Path, *, name: str | None = None, analysis: CatchmentAnalysis | None = None, rainfall: Any | None = None, rainfall_comparison: RegimeComparison | None = None, rainfall_source: Literal['csv', 'silo'] | None = None, rainfall_warning: str | None = None, rainfall_comparison_warning: str | None = None, aoi_context: AOIContext | None = None, title: str | None = None, subtitle: str | None = None, quality_note: str | None = None, value_col: str = 'extent_pct', date_col: str | None = None, run_context: Mapping[str, Any] | None = None) -> CatchmentReportPaths

Write HTML plus a compact, route-aware CSV bundle.

name is optional because an AOI may not correspond to a named catchment. Blank names are rendered as HydroSeason results and use a safe hydroseason-results filename stem.

Rainfall context is presentation-only and additive: rainfall_comparison, rainfall_source, rainfall_warning, and rainfall_comparison_warning never alter the route-aware KPIs or primary figures -- they only render an optional collapsible rainfall section below them. Direct rainfall= callers that do not specify rainfall_source are labelled "supplied CSV".

generate_html_report

generate_html_report(extent: DataFrame, hydro_years: DataFrame, output_path: str | Path, title: str = 'HydroSeason Seasonal Analysis', *, subtitle: str | None = None, quality_note: str | None = None) -> Path

Render a supplied-year HTML report without creating CSV files.

Compatibility API for callers that already have their own hydro_years DataFrame; prefer :func:generate_catchment_report for new code.