ITR.data.inmemory
Module Contents
Classes
Data provider to read in-memory dict. |
Attributes
- ITR.data.inmemory.class_definitions
- class ITR.data.inmemory.InMemoryProvider(fundamental: class_definitions[InMemoryProvider.__init__.fundamental], targets: class_definitions[target], config: Type[ITR.configs.ColumnsConfig] = ColumnsConfig)
Bases:
ITR.data.data_provider.DataProvider
Data provider to read in-memory dict.
- Parameters
fundamental – A dictionary with the fundamental data
targets – A dictionary with the target data
- get_targets(self, company_ids: list) List[ITR.interfaces.IDataProviderTarget]
Get all relevant targets for a list of company ids (ISIN). This method should return a list of IDataProviderTarget instances.
- Parameters
company_ids – A list of company IDs (ISINs)
- Returns
A list containing the targets
- _target_df_to_model(self, df_targets)
transforms target Dataframe into list of IDataProviderTarget instances
- Parameters
df_targets – pandas Dataframe with targets
- Returns
A list containing the targets
- get_company_data(self, company_ids: list) List[ITR.interfaces.IDataProviderCompany]
Get all relevant data for a list of company ids (ISIN). This method should return a list of IDataProviderCompany instances.
- Parameters
company_ids – A list of company IDs (ISINs)
- Returns
A list containing the company data
- get_sbti_targets(self, companies: list) list
For each of the companies, get the status of their target (Target set, Committed or No target) as it’s known to the SBTi.
- Parameters
companies – A list of companies. Each company should be a dict with a “company_name” and “company_id” field.
- Returns
The original list, enriched with a field called “sbti_target_status”