Energy Collectionο
- class emflow.assets.energycollection.Site(name: Optional[str] = None, assets: List[energydatamodel.base.EnergyAsset] = <factory>, longitude: Optional[float] = None, latitude: Optional[float] = None, altitude: Optional[float] = None, tz: Optional[timezone] = None, location: Optional[energydatamodel.geospatial.GeoLocation] = None, *, collections: Optional[List[ForwardRef('EnergyCollection')]] = <factory>, timeseries: Optional[List[Union[energydatamodel.timeseries.TimeSeries, energydatamodel.timeseries.TimeSeriesTable]]] = None)[source]ο
Bases:
EnergyCollection- assets: List[EnergyAsset]ο
- longitude: float | None = Noneο
- latitude: float | None = Noneο
- altitude: float | None = Noneο
- tz: timezone | None = Noneο
- location: GeoLocation | None = Noneο
- name: str | None = Noneο
- add_assets(assets: EnergyAsset | List[EnergyAsset])[source]ο
- remove_asset(asset: EnergyAsset)[source]ο
- add_collection(collection: EnergyCollection)ο
- geometry_to_geojson(geometry)ο
- get_asset_by_name(name: str)ο
- list_collections()ο
- plot_timeseries(columns: List[str] | None = None, start_date: str | None = None, end_date: str | None = None) Axesο
Plot signals from the collectionβs timeseries list.
Each entry in
self.timeseriesis converted to a pandas DataFrame, column names are prefixed with the entryβs name (if set) to avoid collisions, and the results are concatenated before plotting.- Args:
columns: Signal names to plot. Defaults to all columns. start_date: ISO 8601 start date string for slicing (inclusive). end_date: ISO 8601 end date string for slicing (inclusive).
- Returns:
The Matplotlib Axes object of the plot.
- remove_collection(collection: EnergyCollection)ο
- timeseries: t.Optional[t.List[t.Union[TimeSeries, TimeSeriesTable]]] = Noneο
- to_dataframe()ο
Convert data class to a pandas DataFrame.
- to_geojson(exclude_none=True)ο
- to_json(include_none: bool = False) strο
- to_tree(only_named=True, show_type=False, return_tree=False)ο
- collections: t.Optional[t.List['EnergyCollection']]ο
- class emflow.assets.energycollection.EnergyCommunity(*, name: str | None = None, assets: ~typing.List[~energydatamodel.base.EnergyAsset] | None = <factory>, collections: ~typing.List[~energydatamodel.base.EnergyCollection] | None = <factory>, timeseries: ~typing.List[~energydatamodel.timeseries.TimeSeries | ~energydatamodel.timeseries.TimeSeriesTable] | None = None)[source]ο
Bases:
EnergyCollectionA Portfolio is like an EnergySystem but is used more for the purpose of trading energy rather than maintaining an energy balance.
- add_assets(assets: EnergyAsset | List[EnergyAsset])ο
- add_collection(collection: EnergyCollection)ο
- geometry_to_geojson(geometry)ο
- get_asset_by_name(name: str)ο
- list_assets()ο
- list_collections()ο
- name: t.Optional[str] = Noneο
- plot_timeseries(columns: List[str] | None = None, start_date: str | None = None, end_date: str | None = None) Axesο
Plot signals from the collectionβs timeseries list.
Each entry in
self.timeseriesis converted to a pandas DataFrame, column names are prefixed with the entryβs name (if set) to avoid collisions, and the results are concatenated before plotting.- Args:
columns: Signal names to plot. Defaults to all columns. start_date: ISO 8601 start date string for slicing (inclusive). end_date: ISO 8601 end date string for slicing (inclusive).
- Returns:
The Matplotlib Axes object of the plot.
- remove_asset(asset: EnergyAsset)ο
- remove_collection(collection: EnergyCollection)ο
- timeseries: t.Optional[t.List[t.Union[TimeSeries, TimeSeriesTable]]] = Noneο
- to_dataframe()ο
Convert data class to a pandas DataFrame.
- to_geojson(exclude_none=True)ο
- to_json(include_none: bool = False) strο
- to_tree(only_named=True, show_type=False, return_tree=False)ο
- assets: t.Optional[t.List[EnergyAsset]]ο
- collections: t.Optional[t.List['EnergyCollection']]ο
- class emflow.assets.energycollection.Portfolio(*, name: str | None = None, assets: ~typing.List[~energydatamodel.base.EnergyAsset] | None = <factory>, collections: ~typing.List[~energydatamodel.base.EnergyCollection] | None = <factory>, timeseries: ~typing.List[~energydatamodel.timeseries.TimeSeries | ~energydatamodel.timeseries.TimeSeriesTable] | None = None)[source]ο
Bases:
EnergyCollectionA Portfolio is like an EnergySystem but is used more for the purpose of trading energy rather than maintaining an energy balance.
- plot_timeseries(start_date: str | None = None, end_date: str | None = None, subplots: bool = False) Tuple[Figure, Axes] | Tuple[Figure, ndarray][source]ο
Plot signals from the collectionβs timeseries list.
Each entry in
self.timeseriesis converted to a pandas DataFrame, column names are prefixed with the entryβs name (if set) to avoid collisions, and the results are concatenated before plotting.- Args:
columns: Signal names to plot. Defaults to all columns. start_date: ISO 8601 start date string for slicing (inclusive). end_date: ISO 8601 end date string for slicing (inclusive).
- Returns:
The Matplotlib Axes object of the plot.
- add_assets(assets: EnergyAsset | List[EnergyAsset])ο
- add_collection(collection: EnergyCollection)ο
- geometry_to_geojson(geometry)ο
- get_asset_by_name(name: str)ο
- list_assets()ο
- list_collections()ο
- name: t.Optional[str] = Noneο
- remove_asset(asset: EnergyAsset)ο
- remove_collection(collection: EnergyCollection)ο
- timeseries: t.Optional[t.List[t.Union[TimeSeries, TimeSeriesTable]]] = Noneο
- to_dataframe()ο
Convert data class to a pandas DataFrame.
- to_geojson(exclude_none=True)ο
- to_json(include_none: bool = False) strο
- to_tree(only_named=True, show_type=False, return_tree=False)ο
- assets: t.Optional[t.List[EnergyAsset]]ο
- collections: t.Optional[t.List['EnergyCollection']]ο