Skip to content

Add carbon emissions to TCL by drivers DataMart endpoint #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025

Conversation

solomon-negusse
Copy link
Member

@solomon-negusse solomon-negusse commented May 7, 2025

Carbon emissions is now included as additional entry to the tree cover loss by drivers response as below. Not releasing a new version as it's a non-breaking additive change. This also updates the drive names to what's in the latest version (and as a bonus adds WDPA AOI to the API docs:))

    "result": {
        "tree_cover_loss_by_driver": [
            {
                "drivers_type": "Permanent agriculture",
                "loss_area_ha": 110,
                "gross_carbon_emissions_Mg": 146.5,
            },
            ...
            {
                "drivers_type": "Shifting agriculture",
                "loss_area_ha": 107,
                "gross_carbon_emissions_Mg": 141.2,
            },
            {
                "drivers_type": "Forestry",
                "loss_area_ha": 193.4,
                "gross_carbon_emissions_Mg": 196.2,
            },
        ],
        "yearly_tree_cover_loss_by_driver": [
            {
                "drivers_type": "Permanent agriculture",
                "loss_year": 2001,
                "loss_area_ha": 10,
                "gross_carbon_emissions_Mg": 66.5,
            },
            ...,
            {
                "drivers_type": "Commodity driven deforestation",
                "loss_year": 2001,
                "loss_area_ha": 12,
                "gross_carbon_emissions_Mg": 78.9,
            },
            {
                "drivers_type": "Shifting agriculture",
                "loss_year": 2001,
                "loss_area_ha": 7,
                "gross_carbon_emissions_Mg": 54.2,
            },
        ],
    },
 

@solomon-negusse solomon-negusse changed the title Add emissions to TCL by drivers DataMart endpoint Add carbon emissions to TCL by drivers DataMart endpoint May 7, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.56%. Comparing base (7e3a1a8) to head (28cade6).

Files with missing lines Patch % Lines
app/tasks/datamart/land.py 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #695   +/-   ##
========================================
  Coverage    76.56%   76.56%           
========================================
  Files          143      143           
  Lines         6704     6704           
========================================
  Hits          5133     5133           
  Misses        1571     1571           
Flag Coverage Δ
unittests 76.56% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@gtempus gtempus left a comment

Choose a reason for hiding this comment

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

Very nice, @solomon-negusse! 💯

Copy link
Member

@jterry64 jterry64 left a comment

Choose a reason for hiding this comment

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

Looks good to me. I was imagining it as a separate object (like yearly_emissions_from_tree_cover_loss), but this is even more elegant!

@solomon-negusse solomon-negusse merged commit 932805d into develop May 9, 2025
1 of 2 checks passed
@solomon-negusse solomon-negusse deleted the gtc-3287/emissions-dmart branch May 9, 2025 17:29
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.

5 participants