Skip to content

feat(notebooks): add 05_impact_reporting stakeholder template#49

Merged
Goldokpa merged 1 commit into
developfrom
feature/notebook-05-impact-reporting
May 5, 2026
Merged

feat(notebooks): add 05_impact_reporting stakeholder template#49
Goldokpa merged 1 commit into
developfrom
feature/notebook-05-impact-reporting

Conversation

@franchaise
Copy link
Copy Markdown
Collaborator

Summary

  • Adds notebooks/05_impact_reporting.ipynb — end-to-end impact reporting template that combines analytics.carbon.estimate_carbon, analytics.statistics.compute_trend, and analytics.reporting.generate_report for a configurable region/period.
  • Pulls in validation metrics from outputs/validation/benchmark_report.json (produced by the validation notebook in feat(notebooks): add 04_model_validation benchmarking notebook #48) and falls back to a baseline when not present.
  • Produces both the structured JSON used by the /api/reports endpoint and a stakeholder-ready Markdown narrative under outputs/reports/.
  • Region / bbox / period / forest_type are top-level constants so the same notebook re-runs for Amazon, Congo, or Southeast Asia by swapping a few lines.

Why

Sprint deliverable: "Create 05_impact_reporting.ipynb — template for regional impact reports." Closes the carbon-analytics loop: training (#46) -> analysis (#47) -> validation (#48) -> reporting (this).

Test plan

  • Valid notebook JSON.
  • Runs top-to-bottom on synthetic data via papermill without errors.
  • Output Markdown opens cleanly in the GitHub renderer.

Notes for reviewers

  • Designed to be scheduled quarterly via papermill once the analytics database is wired up.
  • The narrative output is intentionally factual / non-promotional; the prose-smoothing pass is delegated to climatevision.reports.llm_reporter (Linda's feat(reports): add LLM-backed impact report generator #38) once both PRs land.

End-to-end impact reporting workflow: loads a deforestation mask,
runs estimate_carbon for tonnes-of-CO2e and confidence intervals,
computes a trend over the trailing 12 months, attaches validation
metrics from 04_model_validation.ipynb when available, calls
analytics.reporting.generate_report, and renders a stakeholder-ready
Markdown narrative with headline numbers, trend, and validation
section. Region/period/bbox are top-level constants so the same
notebook can be re-run for Amazon, Congo, or Southeast Asia.
@franchaise franchaise requested a review from Goldokpa as a code owner May 5, 2026 13:05
Copy link
Copy Markdown
Collaborator

@femi23 femi23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data contract matches the /api/reports response shape we're serving in #42, so this notebook can be used as the reference implementation for what the API should return for a region/period query. The Markdown narrative is factual / non-promotional which is the right tone for the NGOs we're delivering to.

Approved.

@Goldokpa Goldokpa merged commit 389f30e into develop May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants