This function searches for EDDI data on a specific date, returning a Raster* object.

get_eddi(date, timescale, dir = tempdir(), overwrite = FALSE)

Arguments

date

An object of class Date or a character string formatted as are to be acquired. To specify a time interval or date range, date can be a vector of class Date such as produced by seq.Date.

timescale

A string that specifies the timescale for EDDI, e.g., "1 week", "12 month". The get_eddi function assumes that a space separates the number for the timescale (e.g., "1", "12") from the units (e.g., "week", "month"). Fractional timescales are not supported, and will be rounded to the nearest integer (e.g., "1.1 week" will be converted to "1 week").

dir

Directory to for downloaded EDDI data. By default this will be a temporary directory. This should be a file path specified as a string.

overwrite

Boolean to indicate whether to overwrite EDDI data that already exist locally in dir. Defaults to FALSE.

Value

A Raster* object containing EDDI data. Each layer in this object corresponds to data for one date.

Details

The Evaporative Demand Drought Index is available for each day from 1980 to present, usually with a ~5 day lag to the current date. It is available at multiple timescales, including the 1 to 12 week and 1 to 12 months scales. For more information see https://www.esrl.noaa.gov/psd/eddi/

Examples

# note that downloads may take a while, depending on internet connection get_eddi(date = "2018-01-01", timescale = "1 month")
#> class : RasterStack #> dimensions : 224, 464, 103936, 1 (nrow, ncol, ncell, nlayers) #> resolution : 0.125, 0.125 (x, y) #> extent : -125, -67, 25, 53 (xmin, xmax, ymin, ymax) #> crs : +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 #> names : EDDI_ETrs_01mn_20180101 #>