Several non-R objects ship in inst/extdata/ for use in function
examples and the package vignette. They cannot be portably serialized
as .rda files, so they are stored as GeoTIFF and CSV files and
loaded via system.file.
Details
extdata/rasters_raw/Raw synthetic environmental rasters before alignment. Includes
elevation.tif,forest_cover_1.tifthroughforest_cover_15.tif,pr_ann_1.tifthroughpr_ann_15.tif, andprseas_<year>_<season>.tiffor each of 15 years and 4 seasons (60 files).extdata/rasters_aligned/Same rasters after
raster_alignhas reprojected and masked them to the reference grid.extdata/rasters_scaled/Aligned rasters z-scored using the scaling parameters from the seasonal extraction. Used by examples and modeling functions that work with the seasonal predictor set.
extdata/rasters_scaled_annual/Aligned rasters z-scored using the scaling parameters from the annual extraction. Used by examples and modeling functions that work with the annual predictor set (
pr_anninstead ofprseas).extdata/points/synthetic_occurrence_points.csvThe raw synthetic presence dataset: 150 points with
x,y,year,season, andpres = 1.extdata/points/synthetic_occurrence_points.shpSame points as a shapefile.
extdata/points/synthetic_user_presences.csvA second-species presence dataset for demonstrating
method = "user_data"ingenerate_absences. Points were derived from buffer- constrained environmental pseudoabsences of the primary species and reformatted as presences (pres = 1). Same column structure assynthetic_occurrence_points.csv(x,y,year,season,pres).extdata/points/extracted_seasonal_*.csvOutputs from
temporally_explicit_extractionusing the seasonal predictor set:_Raw_Values.csv,_Scaled_Values.csv, and_Scaling_Parameters.csv.extdata/points/extracted_annual_*.csvSame outputs but using the annual predictor set.
extdata/predictions/Per-timestep fold-vote rasters from the seasonal workflow's
generate_spatiotemporal_predictionscall. Fifteen files (Prediction_<year>_Spring.tif) suitable for direct input tosummarize_raster_outputs.extdata/binary/consensus_stack.tifMulti-layer GeoTIFF of binary suitable / unsuitable rasters produced by
summarize_raster_outputswithconsensus = 3. Fifteen layers, one per year, ordered 1 through 15.extdata/binary/frequency_raster.tifCompanion single-layer raster giving the proportion of years each pixel was classified as suitable.
extdata/precomputed/Precomputed prediction outputs read directly by the modeling vignettes (V3a-V3d) so that
generate_spatiotemporal_predictionsdoes not need to be rerun at vignette build time. One subdirectory per model type (glm/,gam/,rf/,hv/), each containingpreds.rdsand apred_tifs/folder.preds.rdsis the list returned bygenerate_spatiotemporal_predictionsfor that model ($timestep_metrics,$overall_summary,$prediction_files, and$model_type), with$prediction_filesreduced to bare file names rather than absolute build-time paths.pred_tifs/holds the 60 per-timestep fold-vote rasters (Prediction_<year>_<season>.tif, 15 years x 4 seasons) projected from that model. The vignettes loadpreds.rdsand rebuild$prediction_filesfrompred_tifs/viasystem.file.
Example load patterns:
### Aligned raster directory
aln_dir <- system.file("extdata/rasters_aligned",
package = "TemporalModelR")
### Consensus stack (multi-layer)
binary_stack <- terra::rast(system.file(
"extdata/binary/consensus_stack.tif", package = "TemporalModelR"
))
### Frequency raster
frequency_rast <- terra::rast(system.file(
"extdata/binary/frequency_raster.tif", package = "TemporalModelR"
))
### Per-timestep prediction directory
pred_dir <- system.file("extdata/predictions",
package = "TemporalModelR")
### Precomputed GLM prediction object and its rasters
glm_preds <- readRDS(system.file(
"extdata/precomputed/glm/preds.rds", package = "TemporalModelR"
))
glm_pred_files <- list.files(
system.file("extdata/precomputed/glm/pred_tifs",
package = "TemporalModelR"),
pattern = "\.tif$", full.names = TRUE
)