Forest + fire + wildlife, woven together with setupProject
2026-06-15
As the forest grows and burns over the coming decades, how does wildlife habitat change?
RSFpredict takes a previously fitted RSF and re-evaluates it against the simulated landscape – every yearBiomass_*scfm familyRSFpredict. . .
setupProject weaves them into one workflowmodules = c(
# forest
"PredictiveEcology/Biomass_borealDataPrep@development",
"PredictiveEcology/Biomass_core@development",
"PredictiveEcology/Biomass_regeneration@master",
# fire (several modules in one repo)
file.path("PredictiveEcology/scfm@development/modules",
c("scfmDataPrep", "scfmIgnition", "scfmEscape",
"scfmSpread", "scfmDiagnostics")),
# wildlife
"JWTurn/RSFpredict@main"
).rdssimulationProcess = "dynamic" → re-predict against the changing landscape each stepstudyArea – a fixed polygon we report onstudyArea_biomassParam – buffered, to avoid edge effectsstudyAreaCalibration – area to calibrate fire (same here)rasterToMatch* templates, derived from one anotherstudyArea = prepInputs(url = saURL, fun = "terra::vect"),
studyArea_biomassParam = terra::buffer(studyArea, 10000),
studyAreaCalibration = studyArea_biomassParam,
rasterToMatch_biomassParam = {
rtml <- terra::disagg(modelLand[[1]], fact = 2)
rtml[] <- 1
terra::mask(rtml, studyArea_biomassParam)
},
rasterToMatchCalibration = rasterToMatch_biomassParam,
rasterToMatch = postProcess(rasterToMatch_biomassParam,
cropTo = studyArea, maskTo = studyArea)*DataPrep / fitting steps opt into a shared Google Drive cachestudyArea is fixed:
Cache key → same result.plots = "png" + saved maps → a folder of time-stamped outputsSpaDES.shiny::shine() scans it and builds a Shiny + leaflet viewerlast - first and custom-difference tabs"differences" palette is purpose-built (blue→white→red)rev() so red = negative (worse habitat), blue = positiveplotChangeOverTime(results) discovers every time-series object in outputPath(results) and shows the first → last differencesimPred, simBinMap)terra::map.pal("differences"), max at topsetupProject() call composes three model families from different authorsterra::plot() for snapshots, plotSAsLeaflet() / plotChangeOverTime() for interactive static-HTML views, shine() for full-Shiny exploration