marmot.plottingmodules.total_generation.TotalGeneration#

class TotalGeneration(Zones: List[str], Scenarios: List[str], AGG_BY: str, ordered_gen: List[str], marmot_solutions_folder: pathlib.Path, gen_categories: marmot.plottingmodules.plotutils.plot_data_helper.GenCategories = GenCategories(vre=[], pv=[], re=[], thermal=[]), marmot_color_dict: Optional[dict] = None, ylabels: Optional[List[str]] = None, xlabels: Optional[List[str]] = None, custom_xticklabels: Optional[List[str]] = None, **kwargs)[source]#

Bases: marmot.plottingmodules.plotutils.plot_data_helper.PlotDataStoreAndProcessor

Total generation plots.

The total_genertion.py module contains methods that are display the total amount of generation over a given time period.

TotalGeneration 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.

  • gen_categories (GenCategories) – Instance of GenCategories class, groups generator technologies into defined categories. Deafults to GenCategories.

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

  • ylabels (List[str], optional) – y-axis labels for facet plots. Defaults to None.

  • xlabels (List[str], optional) – x-axis labels for facet plots. 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

monthly_vre_generation(**kwargs)

Creates clustered barplot of total monthly variable renewable generation by technology.

monthly_vre_generation_percentage(**kwargs)

Creates clustered barplot of total monthly percentage variable renewable generation by technology.

total_gen([start_date_range, ...])

Creates a stacked bar plot of total generation by technology type.

total_gen_diff([start_date_range, ...])

Creates a stacked bar plot of total generation by technology type, relative to a base scenario.

total_gen_facet([start_date_range, ...])

Creates a stacked barplot of total generation.

total_gen_monthly(**kwargs)

Creates stacked bar plot of total generation by technology by month.

total_gen_pie([start_date_range, end_date_range])

Creates a pie chart of total generation and curtailment.

total_gen(start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, scenario_groupby: str = 'Scenario', **_)[source]#

Creates a stacked bar plot of total generation by technology type.

A separate bar is created for each scenario.

Parameters
  • 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.

  • 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

total_gen_diff(start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, scenario_groupby: str = 'Scenario', **_)[source]#

Creates a stacked bar plot of total generation by technology type, relative to a base scenario.

Barplots show the change in total generation relative to a base scenario. The default is to comapre against the first scenario provided in the inputs list. Each sceanrio is plotted as a separate bar.

Parameters
  • 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.

  • 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

total_gen_monthly(**kwargs)[source]#

Creates stacked bar plot of total generation by technology by month.

A separate bar is created for each scenario.

This methods calls _monthly_gen() to create the figure.

Returns

Dictionary containing the created plot and its data table.

Return type

dict

monthly_vre_generation_percentage(**kwargs)[source]#

Creates clustered barplot of total monthly percentage variable renewable generation by technology.

Each vre technology + curtailment if present is plotted as a separate clustered bar, the total of all bars add to 100%. Each scenario is plotted on a separate facet plot. Technologies that belong to VRE can be set in the ordered_gen_catagories.csv file in the Mapping folder.

This methods calls _monthly_gen() and passes the vre_only=True and plot_as_percnt=True arguments to create the figure.

Returns

Dictionary containing the created plot and its data table.

Return type

dict

monthly_vre_generation(**kwargs)[source]#

Creates clustered barplot of total monthly variable renewable generation by technology.

Each vre technology + curtailment if present is plotted as a separate clustered bar Each scenario is plotted on a separate facet plot. Technologies that belong to VRE can be set in the ordered_gen_catagories.csv file in the Mapping folder.

This methods calls _monthly_gen() and passes the vre_only=True arguments to create the figure.

Returns

Dictionary containing the created plot and its data table.

Return type

dict

total_gen_pie(start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, **_)[source]#

Creates a pie chart of total generation and curtailment.

Each sceanrio is plotted as a separate pie chart.

Parameters
  • 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.

Returns

Dictionary containing the created plot and its data table.

Return type

dict

total_gen_facet(start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, scenario_groupby: str = 'Scenario', **_)[source]#

Creates a stacked barplot of total generation. Each scenario will be plotted in a separate bar subplot. This plot is particularly useful for plotting ReEDS results or other models than span multiple years with changing capacity. Ensure scenario_groupby is set to ‘Year-Sceanrio’ to observe this effect.

Parameters
  • 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.

  • 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