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

Confusing usageUnit effect in lookup table creation #1229

Open
2 tasks done
maratumba opened this issue Aug 29, 2023 · 2 comments
Open
2 tasks done

Confusing usageUnit effect in lookup table creation #1229

maratumba opened this issue Aug 29, 2023 · 2 comments
Labels
bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology

Comments

@maratumba
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Operating System:
    • macOS 13.2.1
  • Browser:
    • Not applicable (CLI issue)

Expected Behavior

When creating a lookup table for AWS S3 usage, I would expect the usageUnit column to have a predictable effect on the output. For example, I would expect the lookup table for these entries to be all different and non-zero

serviceName,region,usageType,usageUnit,vCpus
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,GB-Hours,
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,GB-Mo,
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,ByteHrs,

Actual Behavior

The actual lookup table from the input above is this:

serviceName,region,usageType,vCpus,machineType,kilowattHours,co2e
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,,,4.025878297397867e-15,1.526085660316312e-18
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,,,4.025878297397867e-15,1.526085660316312e-18
AmazonS3,us-east-1,USE1-TimedStorage-ByteHrs,,,0,0

The factors in the first two rows are the same even though the usageUnit is different and the factor on the third line is 0.

To Reproduce

create a new app named app

npx @cloud-carbon-footprint/create-app@latest

Then put the above data into app/packages/cli/lookup_input.csv and run the yarn command at root of app:

yarn create-lookup-table --awsInput lookup_input.csv

Then check the output at app/packages/cli/aws_lookup_data.csv

Additional Information

I am trying to calculate emissions for AWS Storage based on data that doesn't have the usageType column so I'm doing my best to fill it in based on information in other columns. But this output is confusing to me and I can't tell which units I should be converting the input data into to get the correct emission estimations.

I could be misunderstanding the basics of how the input data is processed. If so, my apologies.

Thank you for the great project! ❤️

© 2021 Thoughtworks, Inc.

@camcash17
Copy link
Collaborator

Hi @maratumba, thank you for submitting this issue! We will add this to our project board and assign it under "Ready to do" and hopefully get this looked at relatively soon.

@camcash17 camcash17 added bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology labels Aug 31, 2023
@saurabhchatterjee23
Copy link

Hi @maratumba ,
I read the code which generated the report for CO2e

The factors in the first two rows are the same even though the usageUnit is different and the factor on the third line is 0.

I am still trying to figure out why the factors are the same, can you provide me the input data of lookup_input.csv, I do not find it attached here. I can clearly see that the code converts all the usage units to KilowattHours before calculating the C02e

The third unit is 0 because ByteHrs is a unknown usageUnit for the system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working seeking contributor Appropriate for an outside contributor to do and requires less context on the ccf methodology
Projects
Status: 🔖 Ready To Do
Development

No branches or pull requests

3 participants