Overview
When a deforestation run completes, the API should include carbon loss estimates in the response. The src/climatevision/analytics/carbon.py module exists but is not wired into the API response.
Scope
Acceptance Criteria
- Deforestation API response includes
carbon_estimation field
/api/reports/{run_id} returns a complete impact report
- Feature flag gracefully degrades if carbon module is unavailable
- At least one test validates carbon math against known values
Resources
src/climatevision/analytics/carbon.py — existing carbon module
src/climatevision/api/main.py — API endpoints
src/climatevision/inference/pipeline.py — inference flow
team_docs/PM_ROLE_UPDATES_FOR_GAPS.md — Francis' tasks
Difficulty: Intermediate
Labels: help wanted, backend, analytics, api
Overview
When a deforestation run completes, the API should include carbon loss estimates in the response. The
src/climatevision/analytics/carbon.pymodule exists but is not wired into the API response.Scope
src/climatevision/analytics/carbon.pyfor production readinessenable_carbon: truein request)run_inference()or post-processing step foranalysis_type=deforestationcarbon_tonnesandhectares_lostto the API response schemaGET /api/reports/{run_id}endpoint returning structured impact report:hectares_lostcarbon_tonnesconfidence_intervalregion_bboxAcceptance Criteria
carbon_estimationfield/api/reports/{run_id}returns a complete impact reportResources
src/climatevision/analytics/carbon.py— existing carbon modulesrc/climatevision/api/main.py— API endpointssrc/climatevision/inference/pipeline.py— inference flowteam_docs/PM_ROLE_UPDATES_FOR_GAPS.md— Francis' tasksDifficulty: Intermediate
Labels:
help wanted,backend,analytics,api