
Changelog
floodam.cba 1.3.0.0
Release date: 2026-11-16
Enhancements
-
calculate_weight()(export)- add fast vectorized matrix path when
margin = 1and rows share a common frequency order withoutNA
- add fast vectorized matrix path when
-
calculate_weight_vector()(internal)- manage
NAvalues
- manage
-
Case(class & constructor)- add slot
uncertainty(data.frame_NULL) - constructor
Case()automatically initializes and validatesuncertainty, and stores case studynameincharacteristic[["name"]](accessible viacase["name"]) - method
characterize()addsaction,flood,stake_dam,stake_comandperiod(matrix of return periods per sector and flood, including “global”) - accessor
[supportsperiod,flood, andstake_dam - validation method refactored into modular check functions (
check_case_*)
- add slot
-
check_case_action()(new internal)- check expected columns in slot ‘action’ and consistency of actions with slot ‘project’
-
check_case_event()(new internal)- verify that ‘base’ and ‘change’ projects in slot ‘event’ are declared in slot ‘project’
-
check_case_project()(new internal)- check expected columns in slot ‘project’
-
check_case_sector()(new internal)- verify that all elements in slot ‘sector’ are of class ‘Sector’
-
check_case_uncertainty()(new internal)- check expected columns, presence of all required parameters, min <= max, and admissible types in slot ‘uncertainty’
-
check_column()(new internal)- new helper to check missing and extra columns
-
draw_parameter()(new internal)- draw random parameter values from uniform distributions with relative or absolute bounds
-
format_aad()(new internal)- compute average annual damage by state and stake with optional state filtering
-
format_aadd()(new internal)- compute avoided average annual damage relative to project initial state
-
format_flood()(new export)- format return periods and calculate integration weights, with global summary for multiple sectors
-
format_impact()(new internal)- compute nominal avoided damages by flood event and by stake between project initial and final states
-
format_sector()(new export)- flatten multi-dimensional theme arrays into 2D tables, with stake totals and global multi-sector aggregation
-
get_label()(new internal)- retrieve multilingual graphical labels from
label_graphicwith automatic fallback to English ("en")
- retrieve multilingual graphical labels from
-
import_case()(export)- manage
uncertaintysheet and pass file basename (without extension) asnametoCase()
- manage
-
perform_sa()(new export)- perform in-memory Monte Carlo uncertainty analysis and global Sobol sensitivity analysis for both
npvandbenefit, returning an object of class"cba_uncertainty"
- perform in-memory Monte Carlo uncertainty analysis and global Sobol sensitivity analysis for both
-
plot.cba_uncertainty()(new export) -
plot_calendar_state()(new export)- display stacked barplot of annual state weights (simple or probabilistic calendar) for a
Caseproject with multilingual labels and device support
- display stacked barplot of annual state weights (simple or probabilistic calendar) for a
-
plot_sa()(new export)- main wrapper function to display uncertainty distributions, Sobol sensitivity indices, combined 2x1 panels, or 2x2 triplet interaction matrices
-
plot_sa_triplet()(new export)- display a 2x2 visual diagnostic of the 3 most influential parameters on
npvorbenefit
- display a 2x2 visual diagnostic of the 3 most influential parameters on
-
plot_sobol()(new export)- display horizontal barplots of first-order (
S) and/or total-order (T) Sobol sensitivity indices with bootstrap confidence intervals
- display horizontal barplots of first-order (
-
plot_uncertainty()(new export)- display empirical distribution (histogram and/or density) of
npvorbenefitwith nominal reference and negative threshold
- display empirical distribution (histogram and/or density) of
-
prepare_flood_range()(new internal)- adjust flood uncertainty ranges in absolute values, cutting at midpoint in case of overlap
-
prepare_period()(new internal)- build the matrix of return periods across sectors and floods
-
prepare_sa()(new export)- assemble all structured input components (calendar, cost, flood, impact) and metadata for sensitivity analysis
-
prepare_sa_calendar()(new export)- merge annual normalized benefit activation and cost disbursement schedules
-
prepare_sa_calendar_benefit()(new internal)- compute normalized benefit activation schedule
[0, 1]from project state sequence and avoided damages
- compute normalized benefit activation schedule
-
prepare_sa_calendar_cost()(new internal)- compute annual normalized cost disbursement schedules for investment and maintenance per action
-
prepare_sa_cost()(new export)- extract nominal investment and maintenance costs per action paired with uncertainty bounds
-
prepare_sa_flood()(new export)- prepare table of flood hazard parameters (nominal and bounds for return periods and hydraulic efficiency)
-
prepare_sa_impact()(new export)- compute nominal avoided damages by flood event and by stake paired with stake uncertainty bounds
-
prepare_uncertainty()(new export)- new function to generate the complete data.frame of uncertainty parameters for a
Case(costs, return periods, hydraulic efficiency, damages) with default fallback and user override
- new function to generate the complete data.frame of uncertainty parameters for a
-
prop_negative()(new export)- compute proportion of non-positive indicator values across parameter intervals
-
read_from_ext()(internal)- do not show progress while reading ods files (
progress = FALSE)
- do not show progress while reading ods files (
-
sa_calculate_nominal()(new internal)- compute deterministic baseline parameters and CBA indicators for sensitivity analysis
-
sa_draw_parameter()(new internal)- generate Monte Carlo sample matrix of all uncertain parameters prefixed with nominal values
-
sa_fit_impact()(new internal)- scale baseline avoided damages by stake and hydraulic efficiency multipliers
-
sa_model()(new internal)- vectorized evaluation of avoided damages, expected annual benefit, and net present value
-
sa_set_impact_base()(new internal)- extract and flatten nominal avoided damages per stake and flood scenario
-
with_device()(new internal)- open and automatically close graphical output devices (
active,pdf,png,jpg,jpeg,svg) indir_outputusing standardized filename<case>-<project>-<graphic>-<lang>.<ext>
- open and automatically close graphical output devices (
Data & Options
-
data_specification- add specification for
uncertaintytable (parameter,min,max,type)
- add specification for
-
label_graphic(new dataset)- hierarchical dictionary of multilingual graphical labels (
en,fr,es,it,de,pt,zh,ja,ru,ar,hi) generated fromdata-raw/label_graphic.yml
- hierarchical dictionary of multilingual graphical labels (
-
options("floodam.cba")- add options for uncertainty:
uncertainty_col,uncertainty_type_admissible,uncertainty_default,sobol_method,n_uncertainty, andn_boot
- add options for uncertainty:
Dependencies
- Add
sensitivity,graphics,grDevices,stats,toolsandutilstoImports, andyamltoSuggests
Documentation
- Full R Markdown documentation of package options in
?floodam.cbawith alias?floodam.cba-options - Article Getting started (FR)
- Extended with project calendar visualization and uncertainty / sensitivity analysis workflow
- Article Simple CBA (and ACB simple)
- English version of the simple case study vignette
- Articles on uncertainty and sensitivity analysis (EN & FR):
- Articles on package configuration and graphics (EN & FR):
- Updated
DESCRIPTIONandREADME.md(including historical context onCBA-DE-ASandfloodam.cba.sa)
floodam.cba 1.2.0.0
Release date: 2026-10-30
Enhancements
-
discount_rate()- add
officialas default option. -
constantis set to “0.025” (last official recommendation)
- add
-
Case()- method
characterizeset rate togetOption("floodam.cba")[["rate"]]
- method
Documentation
- Article Getting started
- Changed title
- Article Pour démarrer
- French version for Getting started
- Article ACB simple
- French version explaining how to use the library in the most simple case
floodam.cba 1.1.1.0
Release date: 2025-10-29
Enhancements
-
diff_calendar()(internal)- take into account new format for probabilistic calendar
-
print.log_msg()(export)- explicit export to allow its use as a
print()method for object of class “log_msg”
- explicit export to allow its use as a
floodam.cba 1.1.0.0
Release date: 2025-10-27
Enhancements
-
calculate_weight()(export)- management of formats to makes appropriate calls to calculate_weight_vector
- management of data.frame and arrays (correctly)
- documentation and tests
-
calculate_weight_vector()(internal)- type can be chosen between “period” (default) and “frequency”
- management of flood scenarios in any order
-
discount_rate()(export)- add of option quinet2013, option constant is default, option cgp is re-named in cgp 2005
- documentation
-
discount_weight()- documentation
-
list_to_array()- optional test to have a message is something goes wrong
- examples to the documentation, and tests