Skip to contents

A function that extract deforestation area data of the year 2000-2021

Usage

get_def(from, to, region, scale = 100)

Arguments

to, from

it's a string object,starting and final date.

region

region and object sf.

scale

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

Value

a tibble object with the new variable in km2

Examples

if (FALSE) {

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 deforestation area data
data <- region_ee %>%
get_def(
 from = '2001-01-01',
 to = '2005-12-31',
 region = region_ee,
 scale = 30
)
}