Skip to main content

Costs and Benefits package

Project description

Costs Benefits Analysis (CBA)

The Costs and Benefits module belongs to the SISEPUEDE (sImulation of sEctoral Pathways and Uncertainty Exploration for dEcarbonization) decarbonization toolbox.

The module evaluate the Costs and Benefits of bottom-up transformations (decarbonization options) using estimates found in the literature of their costs and benefits.

This includes technical costs or benefits that actors generally experience within a sector and also generally are internal to markets, such as the cost to the agricultural sector of capturing biogas from livestock, the cost of increasing energy efficiency in industry, or the cost of investments in the electricity sector for new capacity to keep up with growing demand. We also include non-technical costs or benefits that are paramount to aligning decarbonization with development goals, such as health benefits of avoided automobile crashes and air pollution, the value of conserving biodiversity, or the time saved thanks to less congestion.

The next table presents a summary of the costs and benefits of transformations across different sectors. Appendices A-G from the report The Benefits and Costs of Reaching Net Zero Emissions in Latin America and the Caribbean provide additional detail on each of these performance metrics, costs, and benefits.

CBA Installation

The CBA module can be installed from PyPi:

pip install costs-benefits-ssp

Usage

# Load packages
from costs_benefits_ssp.cb_calculate import CostBenefits
import pandas as pd
import os

# Define paths
SSP_RESULTS_PATH = "https://raw.githubusercontent.com/milocortes/costs_benefits_ssp/refs/heads/main/test_data"

# Load data
ssp_data = pd.read_csv(os.path.join(SSP_RESULTS_PATH, "sisepuede_results_sisepuede_run_2025-02-11T11;37;41.739098_WIDE_INPUTS_OUTPUTS.csv"))
att_primary = pd.read_csv(os.path.join(SSP_RESULTS_PATH, "ATTRIBUTE_PRIMARY.csv"))
att_strategy = pd.read_csv(os.path.join(SSP_RESULTS_PATH, "ATTRIBUTE_STRATEGY.csv"))
strategy_code_base = "BASE"

# Instantiate CostBenefits object
cb = CostBenefits(ssp_data, att_primary, att_strategy, strategy_code_base)

# The export_db_to_excel method saves the initial configuration of the cost tables to an excel file.
# Each sheet represents a table in the cost and benefit program database.
# If the Excel file name is not given, the file will be saved with the default name cb_config_params.xlsx on the current python session.

CB_DEFAULT_DEFINITION_PATH = os.getcwd()
CB_DEFAULT_DEFINITION_FILE_PATH = os.path.join(CB_DEFAULT_DEFINITION_PATH, "cb_config_params.xlsx")

cb.export_db_to_excel(CB_DEFAULT_DEFINITION_FILE_PATH)

# Once that the excel file has been updated, we can reload it in order to update the cost factors database
cb.load_cb_parameters(CB_DEFAULT_DEFINITION_FILE_PATH)

# Compute System Costs
results_system = cb.compute_system_cost_for_all_strategies()

# Compute Technical Costs
results_tx = cb.compute_technical_cost_for_all_strategies()

# Combine results
results_all = pd.concat([results_system, results_tx], ignore_index = True)

#-------------POST PROCESS SIMULATION RESULTS---------------
# Post process interactions among strategies that affect the same variables
results_all_pp = cb.cb_process_interactions(results_all)

# SHIFT any stray costs incurred from 2015 to 2025 to 2025 and 2035
results_all_pp_shifted = cb.cb_shift_costs(results_all_pp)

# Save the results
results_all_pp_shifted.to_csv("cba_resultados.csv", index = False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

costs_benefits_ssp-0.1.19.tar.gz (87.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

costs_benefits_ssp-0.1.19-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

Details for the file costs_benefits_ssp-0.1.19.tar.gz.

File metadata

  • Download URL: costs_benefits_ssp-0.1.19.tar.gz
  • Upload date:
  • Size: 87.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for costs_benefits_ssp-0.1.19.tar.gz
Algorithm Hash digest
SHA256 0c708ea2b54eeecf8547cc674e7a37dd601744d89dd6cf53b71341a03cb91ba7
MD5 dc48a51d0eec3058d689203c9a9cfecf
BLAKE2b-256 b0ba751588779f34c11b45dbb32c4f4d03985caa9bb7f50ab7a80c29535ac570

See more details on using hashes here.

File details

Details for the file costs_benefits_ssp-0.1.19-py3-none-any.whl.

File metadata

File hashes

Hashes for costs_benefits_ssp-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 956bd3db49552c42ba323792d3b22a9ea262b2fd0b466a75bf948c7b8a511d72
MD5 0cb0db3bcf14e34192fd67f90d1928ca
BLAKE2b-256 b4d8f1df33835ff0fa740269ab7809831ce411c076899f6c1267cdd8773ae3ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page