Skip to contents

A function that extract a time series of the number of population by year (2000-01-01T00:00:00Z - 2021-01-01T00:00:00).

Usage

get_pop(from, to, region, fun = "count", scale = 100)

Arguments

to, from

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

region

it's a feature collection.

fun

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

scale

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

Value

a tibble with the new variables.

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 climate information
data <- region_ee %>% get_pop(
  from = "2001-01-01", to = "2003-01-01",fun = "max",scale = 100)
}