get_vegetation: Extract vegetation index of MODIS

View source: R/get_vegetation.R

get_vegetationR Documentation

Extract vegetation index of MODIS

Description

A function that extract the values of vegetation by month (2000-02-18T00:00:00Z - 2022-04-07T00:00:00).

Usage

get_vegetation(from, to, band, region, fun = "count", scale = 1000)

Arguments

to, from

the starting and final range of date.

band

name of bands.

region

is a feature or feature collection.

fun

function for extract statistic zonal (count, kurtosis, max, mean, median , min, mode , percentile , std, sum, variance, first).

scale

A nominal scale in meters of the projection to work in.

Details

Name of some bands.

  • NDVI: Normalized Difference Vegetation Index.

  • EVI: Enhanced Vegetation Index.

  • SAVI: Soil Adjusted Vegetation Index.

Value

a tibble object with the new variables.

Examples

## Not run: 

library(tidyverse)
library(rgee)
library(innovar)
library(sf)
ee_Initialize()

# 1. Reading a sf object
data("Peru")
region <- Peru
region_ee <- pol_as_ee(region, id = "distr", simplify = 1000)

# 2. Extracting climate information
data <- region_ee %>% get_vegetation(
  from = "2001-02-01", to = "2002-12-31", band = "NDVI", fun = "max"
)

## End(Not run)

healthinnovation/lis documentation built on June 19, 2024, 6:06 a.m.