knitr::opts_chunk$set(echo = TRUE)
library(glint)

Using make_DEM

Get a digital elevation model (DEM) from WorldClim data, aggregate to 1 arc degrees and crop at -60/60 degrees latitude and return a spatial object in the current R session.

DEM <- make_DEM(resolution = 1)

Get a digital elevation model (DEM) from WorldClim data and aggregate to 0.5 arc degrees.

DEM <- make_DEM(resolution = 0.5)

Get a digital elevation model (DEM) from WorldClim data, aggregate to 15 arc minutes and crop at -60/60 degrees latitude and save a GeoTIFF file of the resulting DEM to local disk.

DEM <- make_DEM(resolution = 0.25, dsn = "~/GSOD")

Using get_GSOD

Get GSOD data for 1998 to 2000.

gsod <- make_GSOD_set(years = 1998:2000)

Using interpolate_gsod with a list of data frames

Using interpolate_gsod with a list of CSV files

Example 1: Saving all Files to Local Disk


Example 2: Using In-Memory Data Only

# Create a list of GSOD files
gsod_list <- make_GSOD_set(years = 1998:1999)

# Get and aggregate the raster digital elevation model
dem <- make_DEM()

# Run the function for MAX and MIN temperature
lapply(X = gsod_list, FUN = interpolate_GSOD, dem = dem, vars = c("MAX", "MIN"))


adamhsparks/GRID documentation built on Jan. 27, 2023, 5:48 a.m.