marmot.formatters.formatextra.ExtraProperties#
- class ExtraProperties(model: marmot.formatters.formatbase.Process)[source]#
Bases:
object
Creates extra properties required by Marmots plotter.
Properties can be created based off of existing properties, e.g calculating generator Curtailment from generation and available capacity.
The class takes a model specific instance of a Process class as an input. For example an instance of ProcessPLEXOS is passed when formatting PLEXOS results. This allows access to all the Process class specific methods and attributes. The list of input files are also passed to the class at instantiation.
- Parameters
model (Process) – model specific instance of a Process class, e.g ProcessPLEXOS, ProcessReEDS
Methods
annualize_property
(df, **_)Annualizes any property, groups by year
get_extra_properties
(key)Returns the list of extra properties to process for a given key
Attributes
EXTRA_MARMOT_PROPERTIES
- get_extra_properties(key: str) List[Tuple] [source]#
Returns the list of extra properties to process for a given key
- Parameters
key (str) – Existing property name to create new properties from
- Returns
- Tuple contains name of new property and method used to create
it.
- Return type
List[Tuple]
- annualize_property(df: pandas.core.frame.DataFrame, **_) pandas.core.frame.DataFrame [source]#
Annualizes any property, groups by year
- Parameters
df (pd.DataFrame) – multiindex dataframe with timestamp level.
- Returns
df with timestamp grouped by year.
- Return type
pd.DataFrame