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

Automate configuration of sectors using benchmarks, not manually #157

Open
MichaelTiemannOSC opened this issue Sep 27, 2022 · 0 comments
Open
Assignees
Labels
good first issue Good for newcomers

Comments

@MichaelTiemannOSC
Copy link
Contributor

MichaelTiemannOSC commented Sep 27, 2022

This code in configs.py:

    @classmethod
    def get_configured_sectors(cls) -> List[str]:
        """                                                                                                                                                                                                                                                  
        Get a list of sectors configured in the tool.                                                                                                                                                                                                        
        :return: A list of sectors string values                                                                                                                                                                                                             
        """
        return [SectorsConfig.POWER_UTILITY, SectorsConfig.GAS_UTILITY, SectorsConfig.UTILITY,
                SectorsConfig.STEEL, SectorsConfig.ALUMINUM,
                SectorsConfig.OIL_AND_GAS,
                SectorsConfig.AUTOMOBILE, SectorsConfig.TRUCKING,
                SectorsConfig.CEMENT, SectorsConfig.BUILDINGS,
                SectorsConfig.TEXTILES, SectorsConfig.CHEMICALS,
                ]

and this code in interfaces.py:

    def _sector_to_production_units(self, sector, region="Global"):
        sector_unit_dict = {
            'Electricity Utilities': { 'North America':'MWh', 'Global': 'GJ' },
            'Gas Utilities': { 'Global': 'PJ' },
            'Utilities': { 'Global': 'PJ' },
            'Steel': { 'Global': 't Steel' },
            'Aluminum': { 'Global': 't Aluminum' },
            'Oil & Gas': { 'Global': 'mmboe' },
            'Autos': { 'Global': 'pkm' },
            'Trucking': { 'Global': 'tkm' },
            'Cement': { 'Global': 't Cement' },
            'Buildings': { 'Global': 'billion m**2' }, # Should it be 'built m**2' ?                                                                                                                                                                         
            'Textiles': { 'Global': 'billion USD' },
            'Chemicals': { 'Global': 'billion USD' },
        }
        units = None
        if sector_unit_dict.get(sector):
            region_unit_dict = sector_unit_dict[sector]
            if region_unit_dict.get(region):
                units = region_unit_dict[region]
            else:
                units = region_unit_dict['Global']
        else:
            raise ValueError(f"No source of production metrics for {self.company_name}")
        return units

Should be re-worked to get all the data from benchmark files. We now have 12 (soon to be more than 20) sectors represented, and we don't want to have to bother the source code to add new sectors via benchmark files.

In addition, it is not correct to blindly assume that all benchmarks and all sectors aggregate scope data the same way. Both OECM and TPI prescribe which scope information should be aggregated against what sectoral benchmark. Failure to follow the correct aggregation rules can lead to over- or under-counting emissions vs. the construction of the benchmark. See page 6 of this TPI document for example.

@MichaelTiemannOSC MichaelTiemannOSC added the good first issue Good for newcomers label Sep 27, 2022
MichaelTiemannOSC added a commit to MichaelTiemannOSC/ITR that referenced this issue Sep 27, 2022
See os-climate#157 for long-term fix.

Signed-off-by: MichaelTiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
MichaelTiemannOSC added a commit that referenced this issue Feb 15, 2023
See #157 for long-term fix.

Signed-off-by: MichaelTiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants