ndvi3g: Load ndvi3g data

View source: R/ndvi3g.R

ndvi3gR Documentation

Load ndvi3g data

Description

Function to dextract AVHRR GIMMS ndvi3g data for a specific timeperiod and area of your choice. To download the data see the downloadNDVI() function. Data is available globally and for the timeperiod 1981 - 2015.

Usage

ndvi3g(
  path,
  extent = c(-180, 180, -90, 90),
  startyear = 1981,
  endyear = 2015,
  snap = "near",
  version = "v1",
  output = "ndvi"
)

Arguments

path

Path to file directory where data is stored, should be same as used in downloadNDVI().

extent

An extent object.

startyear

A year between 1981 and 2015.

endyear

A year between 1981 and 2015, should be larger than startyear.

snap

see raster::crop

version

One of "v0" or "v1", otherwise function automatically uses "v1".

output

specify the output variable, default is "ndvi". v0 provides two options: flag and ndvi. v1 provides two options: ndvi and percentile.

Value

raster stack with the extent of extent and layers for each year from startyear till endyear.

Examples

## Not run: 
dat_v0 <- ndvi3g(extent = c(10, 30, 30, 50), version="v0", 
                 startyear=1981, endyear=1982)
flag_dat_v0 <- ndvi3g(extent = c(10, 30, 30, 50), version="v0", startyear=1981, 
                      endyear=1982, output="flag")
dat_v1 <- ndvi3g(extent = c(10, 30, 30, 50), version="v1", startyear=1981, endyear=1982)
perc_dat_v1 <- ndvi3g(extent = c(10, 30, 30, 50), version="v1", startyear=1981, 
                      endyear=1982, output="percentile")

## End(Not run)

RS-eco/ggmap2 documentation built on Dec. 7, 2022, 2:02 a.m.