Skip to content

feat: integrates carbon estimation into API and resolves Issue #14#27

Open
grunffindor wants to merge 1 commit intoClimate-Vision:mainfrom
grunffindor:fix-issue-14
Open

feat: integrates carbon estimation into API and resolves Issue #14#27
grunffindor wants to merge 1 commit intoClimate-Vision:mainfrom
grunffindor:fix-issue-14

Conversation

@grunffindor
Copy link
Copy Markdown

This PR resolves Issue #14 by integrating the carbon stock estimation module into the main API pipeline with graceful degradation.

Key Changes:

  • Pipeline: Updated pipeline.py to execute carbon math during deforestation analysis.
  • Schemas & API: Added the enable_carbon feature flag to request schemas and forwarded it through the inference endpoints.
  • New Endpoint: Created GET /api/reports/{run_id} to return structured impact reports (hectares_lost, carbon_tonnes, and confidence intervals).
  • Testing: Added unit tests in test_carbon.py to validate the carbon math against expected IPCC factors.

Resolves #14

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.

[Good First Issue] Wire carbon analytics into API response and add impact report endpoint

1 participant