Skip to content
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

Update calculatedTotalEmissions to handle multiple units, in cases where tCO2e, tCO2 and other units need to be combined #534

Open
Greenheart opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Greenheart
Copy link
Collaborator

As a consequence of #533, we should likely make the API return the unit(s) clearly for the calculated total. This would be most correct.

How we handle units of the partial emission numbers also affects calculatedTotalEmissions which needs to make sure all numbers use the same unit, e.g. tCO2e. If garbo finds another unit, we either have to convert tCO2 into tCO2e, or disclose the total as an array of calculatedTotalEmissions, one number per unit found in scope1, scope2, scope3, statedTotalEmissions, scope1And2 and all their nested emission numbers.

For example, we could update calculatedTotalEmissions to return something like this:

{
  "calculatedTotalEmissions": [
    {
      "total": 5600,
      "unit": "tCO2e"
    },
    {
      "total": 32800,
      "unit": "tCO2"
    },
  ]
}
@Greenheart Greenheart added the enhancement New feature or request label Dec 19, 2024
@Greenheart Greenheart added this to Garbo Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant