get_pop: Extract population data of WorldPop

Description Usage Arguments Details Value Examples

View source: R/get_pop.R

Description

A function that extract a time series of the number of population.

Usage

1
get_pop(to, from, band, region, fun = "count")

Arguments

to, from

the starting and final range of date.

band

name of band.

region

region and object sf.

fun

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

Details

Name of some bands.

Value

a sf object with the new variables.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

library(tidyverse)
library(rgee)
library(lis)
library(sf)
ee_Initialize()

# 1. Reading a sf object
region <- import_db("Peru_shp")
region_ee <- pol_as_ee(region, simplify = 1000)

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

## End(Not run)

botbarja/test_list documentation built on Dec. 19, 2021, 10:49 a.m.