We can also leverage this in other emissions constructs to deal with just carbon locales:
// this could easily live in the converter now!
LocaleCarbonIntensity fromLocale(CarbonLocale locale) {
return new EmissionsConverter(locale.carbonIntensity);
}
Currently our proposed implementation to retrieve the default carbon intensities for locales is loaded from a csv. We could generate a Java enum from a carbon intensity csv as part of the codebase. Possible initial layout generated from https://github.com/jlee5205/jRAPL/blob/main/src/jcarbon/src/resources/emissions/WorldIntensity.csv:
We can also leverage this in other emissions constructs to deal with just carbon locales: