marmot.plottingmodules.emissions.Emissions#

class Emissions(Zones: List[str], Scenarios: List[str], AGG_BY: str, ordered_gen: List[str], marmot_solutions_folder: pathlib.Path, marmot_color_dict: Optional[dict] = None, custom_xticklabels: Optional[List[str]] = None, **kwargs)[source]#

Bases: marmot.plottingmodules.plotutils.plot_data_helper.PlotDataStoreAndProcessor

Generator emissions plots.

The emissions.py module contains methods that are related to the fossil fuel emissions of generators.

Emissions inherits from the PlotDataStoreAndProcessor class to assist in creating figures.

Parameters
  • Zones (List[str]) – List of regions/zones to plot.

  • Scenarios (List[str]) – List of scenarios to plot.

  • AGG_BY (str) – Informs region type to aggregate by when creating plots.

  • ordered_gen (List[str]) – Ordered list of generator technologies to plot, order defines the generator technology position in stacked bar and area plots.

  • marmot_solutions_folder (Path) – Directory containing Marmot solution outputs.

  • marmot_color_dict (dict, optional) – Dictionary of colors to use for generation technologies. Defaults to None.

  • custom_xticklabels (List[str], optional) – List of custom x labels to apply to barplots. Values will overwite existing ones. Defaults to None.

Methods

total_emissions_by_type([prop, ...])

Creates a stacked bar plot of emissions by generator tech type.

total_emissions_by_type(prop: Optional[str] = None, start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, custom_data_file_path: Optional[pathlib.Path] = None, scenario_groupby: str = 'Scenario', **_)[source]#

Creates a stacked bar plot of emissions by generator tech type.

The emission type to plot is defined using the prop argument. A separate bar is created for each scenario.

Parameters
  • prop (str, optional) – Controls type of emission to plot. Controlled through the plot_select.csv. Defaults to None.

  • start_date_range (str, optional) – Defines a start date at which to represent data from. Defaults to None.

  • end_date_range (str, optional) – Defines a end date at which to represent data to. Defaults to None.

  • custom_data_file_path (Path, optional) – Path to custom data file to concat extra data. Index and column format should be consistent with output data csv.

  • scenario_groupby (str, optional) –

    Specifies whether to group data by Scenario or Year-Sceanrio. If grouping by Year-Sceanrio the year will be identified from the timestamp and appeneded to the sceanrio name. This is useful when plotting data which covers multiple years such as ReEDS. Defaults to Scenario.

    New in version 0.10.0.

Returns

dictionary containing the created plot and its data table.

Return type

dict