process_phenocam: Function to post-process PhenoCam time series

Description Usage Arguments Value Examples

View source: R/process_phenocam.r

Description

Wrapper around other more basic funtions, in order to generate phenocam data products.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
process_phenocam(
  file,
  outlier_detection = TRUE,
  smooth = TRUE,
  contract = FALSE,
  expand = TRUE,
  truncate,
  phenophase = TRUE,
  snow_flag = FALSE,
  penalty = 0.5,
  out_dir = tempdir(),
  internal = FALSE,
  span = NULL,
  plot_optim = FALSE,
  ...
)

Arguments

file

1 or 3-day PhenoCam time series file path

outlier_detection

TRUE or FALSE, detect outliers

smooth

smooth data (logical, default is TRUE)

contract

contract 3-day data upon output (logical, default is TRUE)

expand

expand 3-day data upon input (logical, default is TRUE)

truncate

year (numeric) to which to constrain the output

phenophase

logical, calculate transition dates (default = FALSE)

snow_flag

integrate snow flags?

penalty

how sensitive is the change point algorithm, lower is more sensitve (< 1, default = 0.5)

out_dir

output directory where to store downloaded data

internal

allow for the data element to be returned to the workspace

span

fixed span, NULL by default

plot_optim

whether to plot optimal (default = tempdir())

...

additional parameters to be forwarded to the phenophases() function, used internally in the routine

Value

Downloaded files in out_dir of requested time series products, as well as derived phenophase estimates based upon these time series.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# download the first ROI time series for the Harvard PhenoCam site
# at an aggregation frequency of 3-days.
download_phenocam(site = "harvard$",
                  veg_type = "DB",
                  roi_id = "1000",
                  frequency = "3")
 
# read phenocam data into phenocamr data structure                  
df <- process_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
                  

## End(Not run)

bnasr/phenocamrCS documentation built on June 5, 2020, 3:52 a.m.