reVReports.configs.Config#
- class Config(*, tech: str, scenarios: list[SupplyCurveScenario] = [], plots: Plots = Plots(site_lcoe_max=70, total_lcoe_max=100), map_vars: list[MapVar] = [], exclude_maps: list[str] = [], map_layout: str = 'horizontal', lcoe_site_col: str = 'lcoe_site_usd_per_mwh', lcoe_all_in_col: str = 'lcoe_all_in_usd_per_mwh', cf_col: str = None, prefix_outputs: bool = False)[source]#
Bases:
BaseModelStrictConfiguration settings for creating plots
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
default_scenario_colors(value)Set default colors for scenarios
from_json(json_path)Load configuration from a JSON file.
valid_map_layout(value)Check that the input value for map_layout is valid
valid_tech(value)Check that the input value for tech is valid
Attributes
Get a dictionary mapping scenario names to colors.
Technology type (e.g. 'wind', 'osw', 'pv', 'geo').
List of supply curve scenarios to include in plots
Plot settings (see
Plots)List of mapping variable settings (see
MapVar)List of mapping variables to exclude from mapping
Map layout for scenario grids (
horizontalorvertical)Column name for site LCOE values (in USD/MWh)
Column name for total LCOE values (in USD/MWh)
Column name for capacity factor values (if applicable)
Optional prefix to add to output filenames (e.g.
'map_').- scenarios: list[SupplyCurveScenario]#
List of supply curve scenarios to include in plots
- classmethod default_scenario_colors(value)[source]#
Set default colors for scenarios
If input scenarios do not have a color set, this function sets them to values from the tab10 colormap. This is handled at the Config level rather than the SupplyCurveScenario level so that the colormap can be incremented for each scenario.
- classmethod valid_tech(value)[source]#
Check that the input value for tech is valid
- Parameters:
value (
str) – Input value for ‘tech’- Returns:
str– Returns the input value (as long as it is one of the valid options)- Raises:
reVReportsValueError – A reVReportsValueError will be raised if the input value is not a valid option.
- classmethod valid_map_layout(value)[source]#
Check that the input value for map_layout is valid
- Parameters:
value (
str) – Input value for ‘map_layout’- Returns:
str– Returns the input value (as long as it is one of the valid options)- Raises:
reVReportsValueError – A reVReportsValueError will be raised if the input value is not a valid option.