Statistics#

Statistic functions which can be called within a pypsa.Network via n.statistics.func. For example n.statistics.capex().

Statistic methods#

capex([comps, aggregate_groups, groupby, ...])

Calculate the capital expenditure of the network in given currency.

installed_capex([comps, aggregate_groups, ...])

Calculate the capital expenditure of already built components of the network in given currency.

expanded_capex([comps, aggregate_groups, ...])

Calculate the capex of expanded capacities of the network components in currency.

optimal_capacity([comps, aggregate_groups, ...])

Calculate the optimal capacity of the network components in MW.

installed_capacity([comps, ...])

Calculate the installed capacity of the network components in MW.

expanded_capacity([comps, aggregate_groups, ...])

Calculate the expanded capacity of the network components in MW.

opex([comps, aggregate_time, ...])

Calculate the operational expenditure in the network in given currency.

supply([comps, aggregate_time, ...])

Calculate the supply of components in the network.

withdrawal([comps, aggregate_time, ...])

Calculate the withdrawal of components in the network.

transmission([comps, aggregate_time, ...])

Calculate the transmission of branch components in the network.

energy_balance([comps, aggregate_time, ...])

Calculate the energy balance of components in the network.

curtailment([comps, aggregate_time, ...])

Calculate the curtailment of components in the network in MWh.

capacity_factor([comps, aggregate_time, ...])

Calculate the capacity factor of components in the network.

revenue([comps, aggregate_time, ...])

Calculate the revenue of components in the network in given currency.

market_value([comps, aggregate_time, ...])

Calculate the market value of components in the network in given currency/MWh or currency/unit_{bus_carrier} where unit_{bus_carrier} is the unit of the bus carrier.

Statistic groupers#

Groupers can be used in combination with the statistic methods. For example

groupers = n.statistics.groupers
n.statistics.capex(groupby=groupers.get_carrier)

Or any other grouper could be used.

get_carrier(n, c[, nice_names])

Get the nice carrier names for a component.

get_bus_and_carrier(n, c[, port, nice_names])

Get the buses and nice carrier names for a component.

get_name_bus_and_carrier(n, c[, port, ...])

Get the name, buses and nice carrier names for a component.

get_country_and_carrier(n, c[, port, nice_names])

Get component country and carrier.

get_carrier_and_bus_carrier(n, c[, port, ...])

Get component carrier and bus carrier in one combined list.

get_bus_and_carrier_and_bus_carrier(n, c[, ...])

Get component's carrier, bus and bus carrier in one combined list.

get_bus_unit_and_carrier(n, c[, port, ...])

Get the buses and nice carrier names for a component.