onstove.OnStove.summary#

OnStove.summary(total: bool = True, pretty: bool = True, labels: dict | None = None, variable: str = 'max_benefit_tech', remove_none: bool = False) DataFrame[source]#

Creates a summary of the results grouped by the selected categorical variable.

The method uses the categorical variable provided to group selected results of the gdf dataframe. It produces summary values for the ‘Calibrated_pop’, ‘Households’, ‘maximum_net_benefit’, ‘deaths_avoided’, ‘health_costs_avoided’, ‘time_saved’, ‘opportunity_cost_gained’, ‘reduced_emissions’, ‘emissions_costs_saved’, ‘investment_costs’, ‘fuel_costs’, ‘om_costs’ and ‘salvage_value’ columns of the gdf.

Parameters:
total: boolean, default `True`

If True it will include a ‘Total’ row in the summary dataframe, with totals for all parameters.

pretty: boolean, default `True`

If True the names of the columns in hte summary will be presented with enhanced names. Tha names will be: ‘Max benefit technology’, ‘Population (Million)’, ‘Households (Millions)’, ‘Total net benefit (MUSD)’, ‘Total deaths avoided (pp/yr)’, ‘Health costs avoided (MUSD)’, ‘hours/hh.day’, ‘Opportunity cost avoided (MUSD)’, ‘Reduced emissions (Mton CO2eq)’, ‘Emissions costs saved (MUSD)’, ‘Investment costs (MUSD)’, ‘Fuel costs (MUSD)’, ‘O&M costs (MUSD)’and ‘Salvage value (MUSD)’.

labels: dictionary of str key-value pairs, optional

Dictionary with the keys-value pairs to use for the data categories.

Example of labels dictionary#
{'Collected Traditional Biomass': 'Biomass',
'Collected Improved Biomass': 'Biomass ICS (ND)',
'Traditional Charcoal': 'Charcoal',
'Biomass Forced Draft': 'Biomass ICS (FD)',
'Pellets Forced Draft': 'Pellets ICS (FD)'}
variable: str, defalut ‘max_benefit_tech’

Categorical variable used to group and summarize the data.

remove_none: boolean, default `False`

If True `na and None values are ignored.

Returns:
pd.DataFrame

A dataframe containing the summary information grouped by the selected variable.