getWindowGCVIs_fromFile: Extract the maximum index value by crop window for each point...

Description Usage Arguments Examples

View source: R/processSatelliteSeries.R

Description

Reduces a time series of satellite observations for each point to a maximum value for the specified windows. Requires readr, lubridate, and dplyr. Initial setup is for exports from Jill's GEE script '02.1x_satelliteSampler_forScymOffline'

Usage

1
2
getWindowGCVIs_fromFile(df_file, datasource, maskClouds = FALSE,
  w1_doy1 = 165, w1_doy2 = 200, w2_doy1 = 201, w2_doy2 = 240)

Arguments

df_file

Data.frame containing a veg index of interest

datasource

"Landsat" or "Sentinel"

maskClouds

should cloud qa be applied? defaults to FALSE

w1_doy1

first day of first window; default is US maize

w1_doy2

last day of first window; default is US maize

w2_doy1

first day of second window; default is US maize

w2_doy2

last day of second window; default is US maize

Examples

1
2
3
4
5
6
7
# to apply to a list of files:
landsatFiles <- list.files(gDrive, pattern=landsatBaseName, full.names = TRUE)
# check file sizes and drop empty exports
landsatFilesb <- landsatFiles[sapply(landsatFiles, file.size) > 2]
# load/get window GCVIs - default windows
landsat_gcvi <- purrr::map_df(landsatFilesb, getWindowGCVIs_fromFile,
                               datasource = "Landsat", maskClouds = TRUE)

LobellLab/SCYMr documentation built on Oct. 20, 2020, 1:22 a.m.