Merged
Conversation
folder created script for bias layers added
just created a file to start
Collaborator
Author
|
@SanderDevisscher, bekijk je deze nog eens? |
Collaborator
|
Just was eraan begonnen maar ben nog op een issue gestoten. Ik weet alleen niet meer wat 🤦 |
…/trias-project/risk-modelling-and-mapping into 39-implement-changes-of-diederik
DiederikStrubbe
previously approved these changes
Feb 17, 2026
…tation of country-level rationale
Collaborator
|
@soriadelva the error remains: |
Collaborator
|
@soriadelva here's my sessioninfo |
DiederikStrubbe
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the complete reworking of the wiSDM modelling flow, containing changes in the pseudoabsence selection, model fitting, input layers, ensemble model creation, and validation. These are all explained in the ReadME.
To test the code: run script 06_run_wiSDM. The workflow configurations can be specified in script 00, this is the only script in which users have to specify things manually, other scripts should be run without user input.
Implemented changes:
Pseudoabsence selection:
** Global model: Pseudoabsences are sampled within the same biomes as species presences but excluded from presence grid cells. A taxonomic occurrence grid (bias grid) captures the sampling intensity of the higher taxon and is used to weight grid cells, assigning greater weight to well-sampled areas.
** European model: Pseudoabsences are sampled across all of Europe, excluding presence grid cells. In ecoregions with presences, grid cells are weighted using the bias grid, while outside these ecoregions all cells are assigned the minimum weight (1).
Model fitting:
Models are fitted using the sdm package. In total, 10 different modelling frameworks are fitted on the data ("glm", "gam", "bioclim", "brt", "rf", "glmpoly", "mars", "maxent", "fda", and "cart"). A PCA of model predictions is created, and the 5 models that explain most of the variance along the PC1 axes are selected to create an ensemble with based on the median value of the five models.
Model creation:
The global model is created based on the CHELSA v2 climatic layers, aggregated to a resolution of 5km (using the average). A habitat model is then created at the European level. Global model (climatic suitability predictions) are converted to a 1km resolution and the final predictions are created by combining the climatic predictions with the habitat predictions (multiplying them and taking the sqrt of these values).
Occurrences records:
Occurrences are downloaded from GBIF and processed to remove duplicates, occurrences that fall in grid cells with NA predictor values, occurrences close to country and capital centroids, biodiversity institutes, GBIF headquarters, and the 0,0 point. For the global model, occurrences with a maximum coordinate uncertainty up to 5km (i.e., the resolution of the layers) are kept, while for the European habitat model, only occurrences with a coordinate uncertainty up to 1km are kept (i.e., the resolution of the habitat layers).
Predictor layers:
We now use CHELSA v2 climatic layers (previously, v1 was used). These layers were rescaled to minimize issues arising from differences in units and resulting orders of magnitude.
Habitat layers were updated to incorporate new water-related layers, and the CORINE layers have also been regenerated using the latest corine land use raster available on Copernicus.