Changelog
floodam.agri 1.0.3.0 (2024-09-25)
Enhancements
-
plot_damage_function()
- new function to plot one or more damage functions
- documentation completed
-
plot_disaggregated_damage_function()
- new function to plot a disaggregated damage function
- documentation completed
-
plot_crop_calendar()
- addition of
title_culture
to manage names of crops on plot
- addition of
-
week_axis()
(internal used by graphical functions)- add a weekly label to x axis
-
round_up_nice()
(internal used by graphical functions)- round values nicely for plots
floodam.agri 1.0.2.1 (2024-09-13)
Enhancements
-
aggregate_damage()
-
hazard_agg
parameter is now a list of arrays instead of folder name. Default set tofloodam.agri::HAZARD_AGGREGATE
-
damage_origin
default change fromRPG_total
tototal
-
-
plot_aggregated_damage()
- addition of
col
parameter to manage plot colors
- addition of
-
plot_crop_calendar()
- addition of
col
parameter to manage plot colors
- addition of
-
HAZARD_AGGREGATE
- global data added (list) to simplify damage function aggregation
Documentation
- Vignette
-
Get started
- addition of a plot of aggregated damage curves
-
Get started
floodam.agri 1.0.2.0 (2024-09-12)
Enhancements
-
combine_damaging()
- addition of
retrieve
argument
- addition of
-
plot_aggregated_damage()
- replacement of
plot_agriculture_damage()
- addition of arguments to help usage as wanted
- documentation completed
- TO DO deal with plot legend
- replacement of
-
plot_agriculture_damage()
- removed, replaced by
plot_aggregated_damage()
- removed, replaced by
-
plot_crop_calendar()
- new function to plot crop calendars
- documentation completed
floodam.agri 1.0.1.0 (2024-08-23)
Enhancements
- Some global data has been internalised in folder
data
and documented inR/data.R
. It is built from files ininst/extdata/global_data
:-
COMBINE
(list) -
CURRENT
(data.frame) -
HAZARD
(character vector) -
HAZARD_RESOLUTION
(data.frame) -
LEVEL
(list)
-
-
array_current()
(internal used bymake_curve()
)- documentation completed
- renaming of
current
argument tocurrent_start
- addition of a new
current
argument - TO DO: test
-
calculate_damaging()
- addition of
current
argument
- addition of
-
fit_complement()
(internal used bymake_curve()
)- addition of
current
argument - test added
- documentation completed
- warnings added
- addition of
-
load_hazard()
(internal)- converted as internal (apparently not used, but may be useful for future development)
- addition of
level
argument - change of
hazard
argument tohazard_resolution
-
make_curve()
- documentation completed
- addition of
current
argument
-
plot_agricultural_damage()
- addition of
hazard
argument added
- addition of
floodam.agri 1.0.0.0 (2024-08-21)
This is the first version provided for installation.
Enhancements
- All functions have been renamed to respect snake_case convention.
- All functions have at least a basic documentation, that may not be very useful at this stage.
- Data has been added to the “inst/extdata” folder, with this organisation:
-
classification
(folder in inst/extdata)- classification for french LPIS (RPG).
RPG.csv
is the current classification whileRPG_1.csv
is the old classification.
- classification for french LPIS (RPG).
-
default
(folder in inst/extdata)-
damagement
(crop vulnerability decisions),hazard
(hazard parameters),stat
(action values, prices, yields),typology
(correspondance tables) used to create the french national functions
-
-
national
(folder in inst/extdata)-
2009-2010-2011
data used for french national functions (same as in default but nodamagement
orhazard
files) -
2016
national yields for the year 2016 and associated correspondance tables
-
-
regional
(folder in inst/extdata)-
2016
Occitanie region yields and associated correspondance tables
-
-
example
(folder in inst/extdata)- data used to run tests and examples
- TO DO: internalise some data supported by vignettes
-
-
init_path()
- rework of function to specify several paths where to find data with a user defined priority level
- removal of arguments
extent
,region
,local
,year
andcreate
- addition of
default
argument to specify whether missing values should be completed by default ones - addition of
classification
argument to indicate which classification references to use in making weights - addition of internal functions to help find files (
init_user_path()
,find_data_path()
,find_file_path()
,find_output_files()
,find_weight_files()
,list_hazard_files()
) - addition of warnings
- complete documentation and test added
- TO DO: complete tests for all internal functions
-
prepare_culture()
- rework to fit new paths from
init_path()
- replacement of original arguments by
path
andtypo
- addition of warnings
- complete documentation and test added
- TO DO: keep track of the origin of vulnerability files in a log file
- rework to fit new paths from
-
make_weight()
- addition of
na.rm = TRUE
torowSums()
to deal with NA values - complete documentation and test added
- addition of
-
prepare_typology()
- rework to fit new paths from
init_path()
- replacement of original arguments by
path
andclassification
- addition of an internal function
treat_guideline()
for simplifications - addition of warnings
- complete documentation and test added
- rework to fit new paths from
-
prepare_calendar()
- rework to fit new paths from
init_path()
- addition of an internal function
extract_calendar()
to simplify tests - addition of warnings
- complete documentation and test added
- rework to fit new paths from
-
prepare_action_value()
- rework to fit new paths from
init_path()
- addition of internal functions
extract_calendar()
andextract_yield()
to simplify tests - addition of warnings
- complete documentation and test added
- rework to fit new paths from
-
calculate_damaging()
- rework to fit new paths from
init_path()
- modification of
backup
argument to simplify the specification of desired output - addition of
simple
argument to deal with the output format used incombine_damaging()
- addition of warnings
- complete documentation and test added
- TO DO: deal with global variables
- TO DO: tests for make_curve() or fit_calendar()
- rework to fit new paths from
-
combine_damaging()
- rework to fit new paths from
init_path()
- addition of
weight
argument to indicate which classification should be used for weights - addition of
hazard
to indicate the hazard parameters - addition of internal functions
combine_weight()
andrbind_list()
- complete documentation and test added
- TO DO: check if
hazard
parameter is necessary
- rework to fit new paths from
-
aggregate_damage()
- rework to fit new paths from
init_path()
- addition of new arguments
damage_origin
,hazard_agg
andretrieve
- addition of internal function
calculate_aggregated_damage()
to simplify tests - complete documentation and test added
- rework to fit new paths from
-
plot_agriculture_damage()
- rework to fit new paths from
init_path()
- complete documentation
- TO DO: rework to allow easier customisation
- rework to fit new paths from