% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_documentation.R
\docType{data}
\name{extdata}
\alias{extdata}
\title{Bundled rasters, point files, and prediction outputs}
\description{
Several non-R objects ship in \code{inst/extdata/} for use in function
examples and the package vignette. They cannot be portably serialized
as \code{.rda} files, so they are stored as GeoTIFF and CSV files and
loaded via \code{\link[base]{system.file}}.
}
\details{
\describe{
  \item{\code{extdata/rasters_raw/}}{Raw synthetic environmental rasters
    before alignment. Includes \code{elevation.tif},
    \code{forest_cover_1.tif} through \code{forest_cover_15.tif},
    \code{pr_ann_1.tif} through \code{pr_ann_15.tif}, and
    \code{prseas_<year>_<season>.tif} for each of 15 years and 4
    seasons (60 files).}
  \item{\code{extdata/rasters_aligned/}}{Same rasters after
    \code{\link{raster_align}} has reprojected and masked them to the
    reference grid.}
  \item{\code{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.}
  \item{\code{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 (\code{pr_ann} instead of \code{prseas}).}
  \item{\code{extdata/points/synthetic_occurrence_points.csv}}{The raw
    synthetic presence dataset: 150 points with \code{x}, \code{y},
    \code{year}, \code{season}, and \code{pres = 1}.}
  \item{\code{extdata/points/synthetic_occurrence_points.shp}}{Same
    points as a shapefile.}
  \item{\code{extdata/points/synthetic_user_presences.csv}}{A second-species
    presence dataset for demonstrating \code{method = "user_data"} in
    \code{\link{generate_absences}}. Points were derived from buffer-
    constrained environmental pseudoabsences of the primary species and
    reformatted as presences (\code{pres = 1}). Same column structure as
    \code{synthetic_occurrence_points.csv} (\code{x}, \code{y},
    \code{year}, \code{season}, \code{pres}).}
  \item{\code{extdata/points/extracted_seasonal_*.csv}}{Outputs from
    \code{\link{temporally_explicit_extraction}} using the seasonal
    predictor set: \code{_Raw_Values.csv}, \code{_Scaled_Values.csv},
    and \code{_Scaling_Parameters.csv}.}
  \item{\code{extdata/points/extracted_annual_*.csv}}{Same outputs but
    using the annual predictor set.}
  \item{\code{extdata/predictions/}}{Per-timestep fold-vote rasters
    from the seasonal workflow's
    \code{\link{generate_spatiotemporal_predictions}} call. Fifteen
    files (\code{Prediction_<year>_Spring.tif}) suitable for direct
    input to \code{\link{summarize_raster_outputs}}.}
  \item{\code{extdata/binary/consensus_stack.tif}}{Multi-layer
    GeoTIFF of binary suitable / unsuitable rasters produced by
    \code{\link{summarize_raster_outputs}} with \code{consensus = 3}.
    Fifteen layers, one per year, ordered 1 through 15.}
  \item{\code{extdata/binary/frequency_raster.tif}}{Companion
    single-layer raster giving the proportion of years each pixel was
    classified as suitable.}
  \item{\code{extdata/precomputed/}}{Precomputed prediction outputs read
    directly by the modeling vignettes (V3a-V3d) so that
    \code{\link{generate_spatiotemporal_predictions}} does not need to be
    rerun at vignette build time. One subdirectory per model type
    (\code{glm/}, \code{gam/}, \code{rf/}, \code{hv/}), each containing
    \code{preds.rds} and a \code{pred_tifs/} folder. \code{preds.rds} is
    the list returned by
    \code{\link{generate_spatiotemporal_predictions}} for that model
    (\code{$timestep_metrics}, \code{$overall_summary},
    \code{$prediction_files}, and \code{$model_type}), with
    \code{$prediction_files} reduced to bare file names rather than
    absolute build-time paths. \code{pred_tifs/} holds the 60
    per-timestep fold-vote rasters
    (\code{Prediction_<year>_<season>.tif}, 15 years x 4 seasons)
    projected from that model. The vignettes load \code{preds.rds} and
    rebuild \code{$prediction_files} from \code{pred_tifs/} via
    \code{\link[base]{system.file}}.}
}

Example load patterns:
\preformatted{
  ### 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
  )
}
}
