read_prism_rasters: Read PRISM raster layers into data frame

View source: R/read_prism_rasters.R

read_prism_rastersR Documentation

Read PRISM raster layers into data frame

Description

Scan directory for rasters (*.tif) and parse PRISM layer names into columns of a data frame.

Usage

read_prism_rasters(dir_tif)

Arguments

dir_tif

directory path PRISM daily rasters were downloaded and cropped using read_importprism().

Details

Any existing rasters in dir_tif are scanned based on a common naming structure for the raster file name (⁠prism_daily_{month}-{day}.tif⁠) and layer names (⁠{date}_{variable}_v{version}-{date_updated}⁠) into a data frame.

For more on the Parameter-elevation Relationship on Independent Slopes Model (PRISM), see read_importprism().

Value

A data frame with columns for:

  • path_tif path to GeoTIFF

  • lyr layer name

  • date date of modeled weather data

  • md month-day

  • variable variable of modeled weather data

  • version version (1-8)

  • date_updated date the model was updated

Examples

dir_tif <- system.file("prism", package = "tbeptools")
read_prism_rasters(dir_tif)

tbep-tech/tbeptools documentation built on April 13, 2025, 4:50 p.m.