knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The eddi R package facilitates access to the NOAA Evaporative Demand Drought Index (EDDI) data product.
Install the most recently released version of the eddi package from CRAN:
install.packages('eddi')
Or, you can install the development version of eddi with devtools:
# install.packages("devtools") devtools::install_github("earthlab/eddi")
The EDDI product exists for multiple timescales, including the 1 to 12 week and 1 to 12 months scales. Shorter time scales can detect short term droughts, e.g., "flash droughts", and longer time scales are appropriate for detecting long term drought. For more information see https://www.esrl.noaa.gov/psd/eddi/.
This is a basic example which shows you how to get EDDI data for Nov 29, 2018 at the one month timescale:
library(eddi) eddi_data <- get_eddi(date = "2018-11-29", timescale = "1 month") eddi_data
This will always return a RasterStack
object with each layer in the stack
corresponding to a date, that can be visualized using raster::plot
.
Here, large positive values indicate exceptionally dry conditions, and
large negative values indicate exceptionally wet conditions, with values of 0
indicating median EDDI values.
color_pal <- colorRampPalette(c("blue", "lightblue", "white", "pink", "red")) raster::plot(eddi_data, col = color_pal(255), main = "EDDI data for 2018-11-29")
A user guide for EDDI can be found here: https://www.esrl.noaa.gov/psd/eddi/pdf/EDDI_UserGuide_v1.0.pdf
For the science behind EDDI, see these two papers:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.