gcubed.model_parameters.carbon_coefficients

This module contains the CarbonCoefficients class.

class CarbonCoefficients(gcubed.base.Base):

This class loads and provides access to carbon coefficients by sector for each region.

CarbonCoefficients(sym_data: gcubed.sym_data.SymData)

Constructor

Arguments

sym_data: The information about the SYM model definition.

The model configuration is accessible via this argument, thus enabling discovery of the location of the CSV file that contains the data.

CSV file format

TODO: Specify the CSV file format.

Exceptions

Raises an exception if the model is not suitable for carbon coefficients.

def populate_dictionaries(self, data: pandas.core.frame.DataFrame):

Overview

Populate the dictionaries with data from the dataframe, splitting apart the sector and consumption coefficients and making sure that any omitted rows for energy goods imply zero coefficients.

def sector_coefficients(self, region: str) -> pandas.core.frame.DataFrame:
def final_demand_coefficients(self, region: str) -> pandas.core.frame.DataFrame:
original_dataframe: pandas.core.frame.DataFrame

Return the original data as a dataframe.

def save_as_csv(self, filename: str) -> None:

Save the carbon coefficients as a CSV file in their original format.

Arguments

filename: The path and name of the CSV file to save the data to.