:py:mod:`SBTi.portfolio_aggregation` ==================================== .. py:module:: SBTi.portfolio_aggregation Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: SBTi.portfolio_aggregation.PortfolioAggregationMethod SBTi.portfolio_aggregation.PortfolioAggregation .. py:class:: PortfolioAggregationMethod Bases: :py:obj:`enum.Enum` The portfolio aggregation method determines how the temperature scores for the individual companies are aggregated into a single portfolio score. .. py:attribute:: WATS :annotation: = WATS .. py:attribute:: TETS :annotation: = TETS .. py:attribute:: MOTS :annotation: = MOTS .. py:attribute:: EOTS :annotation: = EOTS .. py:attribute:: ECOTS :annotation: = ECOTS .. py:attribute:: AOTS :annotation: = AOTS .. py:attribute:: ROTS :annotation: = ROTS .. py:method:: is_emissions_based(method: PortfolioAggregationMethod) -> bool :staticmethod: Check whether a given method is emissions-based (i.e. it uses the emissions to calculate the aggregation). :param method: The method to check :return: .. py:method:: get_value_column(method: PortfolioAggregationMethod, column_config: Type[SBTi.configs.ColumnsConfig]) -> str :staticmethod: .. py:class:: PortfolioAggregation(config: Type[SBTi.configs.PortfolioAggregationConfig] = PortfolioAggregationConfig) Bases: :py:obj:`abc.ABC` This class is a base class that provides portfolio aggregation calculation. :param config: A class defining the constants that are used throughout this class. This parameter is only required if you'd like to overwrite a constant. This can be done by extending the PortfolioAggregationConfig class and overwriting one of the parameters. .. py:method:: _check_column(self, data: pandas.DataFrame, column: str) Check if a certain column is filled for all companies. If not throw an error. :param data: The data to check :param column: The column to check :return: .. py:method:: _calculate_aggregate_score(self, data: pandas.DataFrame, input_column: str, portfolio_aggregation_method: PortfolioAggregationMethod) -> pandas.Series Aggregate the scores in a given column based on a certain portfolio aggregation method. :param data: The data to run the calculations on :param input_column: The input column (containing the scores) :param portfolio_aggregation_method: The method to use :return: The aggregates score