Here is a series of scripts to extract enviromental variables, select depth layers from 4D netCDFs, and fit BRT models.
Cite using the following doi:
1_Preparing_dataframe: Data organising.
2_Obtaining_Enviro_data: Enables downloading data from CMEMS (future research - requiered update to Python) and ERA5 (Copernicus) and enables extracting the enviromental data to the surveyed points.
3_Subsetting_Checking_data: Conduct pre-fitting checks on data.
4_Fitting_brt: Enables fitting a brt model applied to predict at-vessel mortality (AVM) for demersal sharks using biological, enviromental and fishing operation drivers.
5_Plots: Create study map and raincloud plots as data summary.
Appendix 1: theoretical recommendations and training on BRT fitting