pypsa.statistics.StatisticsAccessor.energy_balance

pypsa.statistics.StatisticsAccessor.energy_balance#

StatisticsAccessor.energy_balance(comps: ~collections.abc.Sequence[str] | str | None = None, aggregate_time: str | bool = 'sum', aggregate_groups: ~collections.abc.Callable | str | bool = 'sum', groupby: ~collections.abc.Callable | None = <function get_carrier_and_bus_carrier>, at_port: ~collections.abc.Sequence[str] | str | bool = True, bus_carrier: ~collections.abc.Sequence[str] | 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’.