-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
This epic introduces web-based interaction with the California Life-Cycle Benefit/Cost Analysis Model
In its current form as of August 21, 2025 the CalB/C model is an Excel workbook providing a standardized cost/benefit model for Caltrans projects. This workbook ships with a series of screens requiring an Analyst to provide a series of inputs appropriate to their project type.
After the completion of #20, depending on design, this epic represents development of a browser-based web application, deployed in the https://github.com/cal-itp/data-infra environment. This application relies on the logic introduced during development of the command line tool.
Acceptance Criteria
Previous Overview
The goal of this project is to develop a web-based interactive tool for the California Benefit-Cost Analysis Tool using Python. This tool will replicate the functionality of the Excel-based CalB/C model with dynamic widgets, automatic formula replication, and real-time benefit-cost calculations.
A structured development workflow and codebase architecture has been established, and the widget system is under active development.
Research required:
- Best practices for translating Excel logic into reactive Python widget workflows
- Dynamic UI creation with
ipywidgets+Voila - Packaging and launching notebook apps as end-user-facing webtools
- Long-term maintainability: modularization, documentation, and testing of all metric scripts
Notes, misc:
- A detailed
README.mdcurrently exists that documents folder structure, workflow, and widget integration, but it is still in draft form and requires final polishing for clarity and completeness before publishing—this finalization will occur once additional metrics are added to the project. - The project begins with the
CalBC Sketch model, for which multiple modules will be created and integrated to replicate the Excel model sheets and calculations. - All modules are currently in a piloting phase; they are functional but require further refinement, testing, and updates before full release.
Task flow for Sketch Model
-
Develop helper and parameter modules:
-
widgets_helper.py — Descriptive info and UI helper functions for widget creation
-
parameters.py — Fixed parameter values replicating the CalB/C
PARAMETERSsheet -
Develop input widget builder modules
-
projectinfo_widgets.py— Build interactive widgets for Project Information sheet -
modelinputs_widgets.py— Build interactive widgets for Model Inputs sheet -
Create metric calculation
-
travel_time.py— Calculate Travel Time Benefits -
safety.py— Calculate Safety Benefits -
emissions.py— Calculate Emissions Benefits -
reliability.py— Calculate Reliability Benefits -
vehicle_operating_costs.py— Calculate Vehicle Operating Costs Benefits -
Implement summary metric module
-
BCA.py— Generate Benefit-Cost Ratio widget -
Integrate all components into
-
Running Widgets.ipynb— Main interface and Voila launch entry point -
Deployment
-
Deploy the project as a fully functional web-based tool accessible to users without local setup
Deliverables
- A fully functional web-based interactive tool that allows users to input project data, dynamically replicates Excel model calculations via widgets, and outputs real-time benefit-cost analysis results.
- A final polished README markdown file clearly documenting the folder structure, development workflow, widget integration process, and instructions for use and deployment.
- Fully integrated and tested Python modules that replicate the Excel sheets’ logic and formulas as interactive widgets, designed for maintainability and extensibility.