transition_dates: Calculates transition dates for a PhenoCam time series

View source: R/transition_dates.r

transition_datesR Documentation

Calculates transition dates for a PhenoCam time series

Description

Segments of a PhenoCam time series and calculates threshold based transition dates for all segments. This function is rarely called stand alone and 'phenophases()' should be preferred when evaluating PhenoCam time series.

Usage

transition_dates(
  data,
  lower_thresh = 0.1,
  middle_thresh = 0.25,
  upper_thresh = 0.5,
  percentile = 90,
  penalty = 0.5,
  seg_length = 14,
  reverse = FALSE,
  plot = FALSE
)

Arguments

data

a PhenoCam data file or data structure

lower_thresh

the minimum threshold used (default = 0.1)

middle_thresh

the middle threshold used (default = 0.25)

upper_thresh

the maximum threshold used (default = 0.5)

percentile

time series percentiles to process (mean, 50, 75, 90)

penalty

how sensitive is the algorithm, lower is more sensitve (< 1 )

seg_length

minimum length of a segment to be evaluated

reverse

flip the direction of the processing

plot

plot for debugging purposes

Value

Transition date estimates in UNIX time, including uncertainties and the threshold values estimated for each section of a time series.

Examples


## Not run: 
# download demo data
download_phenocam(site = "harvard$",
                  veg_type = "DB",
                  roi_id = "1000",
                  frequency = "3")

# read the data and calculate transition dates
df <- read_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
my_dates <- transition_dates(df,
                            lower_thresh = 0.1,
                            middle_thresh = 0.25,
                            upper_thresh = 0.5,
                            percentile = 90,
                            reverse = FALSE,
                            plot = FALSE)

## End(Not run)

bluegreen-labs/phenocamr documentation built on Feb. 6, 2024, 10:42 p.m.