pypsa.statistics.StatisticsAccessor.energy_balance

pypsa.statistics.StatisticsAccessor.energy_balance#

StatisticsAccessor.energy_balance(comps: str | Sequence[str] | None = None, aggregate_time: str | bool = 'sum', aggregate_groups: Callable | str = 'sum', aggregate_across_components: bool = False, groupby: str | Sequence[str] | Callable = ['carrier', 'bus_carrier'], at_port: bool | str | Sequence[str] = True, bus_carrier: str | Sequence[str] | None = None, nice_names: bool | None = None, kind: str | None = None) DataFrame#

Calculate the energy balance of components in the network. Positive values represent a supply and negative a withdrawal. Units depend on the regarded bus carrier.

For information on the list of arguments, see the docs in Network.statistics or pypsa.statistics.StatisticsAccessor.

Additional parameter#

aggregate_bus: bool, optional

Whether to obtain the nodal or carrier-wise energy balance. Default is True, corresponding to the carrier-wise balance.

aggregate_timestr, bool, optional

Type of aggregation when aggregating time series. Note that for {‘mean’, ‘sum’} the time series are aggregated to MWh using snapshot weightings. With False the time series is given in MW. Defaults to ‘sum’.