marmot.plottingmodules.generation_stack.GenerationStack#
- class GenerationStack(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, scenario_diff: Optional[List[str]] = None, ylabels: Optional[List[str]] = None, xlabels: Optional[List[str]] = None, **kwargs)[source]#
Bases:
marmot.plottingmodules.plotutils.plot_data_helper.PlotDataStoreAndProcessor
Timeseries generation stacked area plots.
The generation_stack.py contains methods that are related to the timeseries generation of generators, in a stacked area format.
GenerationStack 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.
scenario_diff (List[str], optional) – 2 value list, used to compare 2 scenarios. 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.
Methods
committed_stack
([start_date_range, ...])Plots the timeseries of committed generation compared to the total available capacity
gen_diff
([timezone, start_date_range, ...])Plots the difference in generation between two scenarios.
gen_stack
([prop, start, end, timezone, ...])Creates a timeseries stacked area plot of generation by technology.
- committed_stack(start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, data_resolution: str = '', **_)[source]#
Plots the timeseries of committed generation compared to the total available capacity
The upper line shows the total available cpacity that can be committed The area between the lower line and the x-axis plots the total capacity that is committed and producing energy.
Any gap that exists between the upper and lower line is generation that is not committed but available to use.
Data is plotted in a facet plot, each row of the facet plot represents separate generation technologies. Each bar the facet plot represents separate scenarios.
- 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.
data_resolution (str, optional) –
Specifies the data resolution to pull from the formatted data and plot. Defaults to “”, which will pull interval data.
New in version 0.10.0.
- Returns
dictionary containing the created plot and its data table.
- Return type
- gen_stack(prop: Optional[str] = None, start: Optional[float] = None, end: Optional[float] = None, timezone: str = '', start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, data_resolution: str = '', **_)[source]#
Creates a timeseries stacked area plot of generation by technology.
The stack order of technologies is determined by the ordered_gen_categories.csv
If multiple scenarios are passed they will be plotted in a facet plot. The plot can be further customized by passing specific values to the prop argument.
- Parameters
prop (str, optional) –
Special argument used to adjust specific plot settings. Controlled through the plot_select.csv. Opinions available are:
Peak Demand
Min Net Load
Peak RE
Peak Unserved Energy
Peak Curtailment
Defaults to None.
start (float, optional) – Used in conjunction with the prop argument. Will define the number of days to plot before a certain event in a timeseries plot, e.g Peak Demand. Defaults to None.
end (float, optional) – Used in conjunction with the prop argument. Will define the number of days to plot after a certain event in a timeseries plot, e.g Peak Demand. Defaults to None.
timezone (str, optional) – The timezone to display on the x-axes. Defaults to “”.
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.
data_resolution (str, optional) –
Specifies the data resolution to pull from the formatted data and plot. Defaults to “”, which will pull interval data.
New in version 0.10.0.
- Returns
dictionary containing the created plot and its data table.
- Return type
- gen_diff(timezone: str = '', start_date_range: Optional[str] = None, end_date_range: Optional[str] = None, data_resolution: str = '', **_)[source]#
Plots the difference in generation between two scenarios.
A line plot is created for each technology representing the difference between the scenarios.
- Parameters
timezone (str, optional) – The timezone to display on the x-axes. Defaults to “”.
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.
data_resolution (str, optional) –
Specifies the data resolution to pull from the formatted data and plot. Defaults to “”, which will pull interval data.
New in version 0.10.0.
- Returns
dictionary containing the created plot and its data table.
- Return type