Seasonal Decomposition per Area

Description

Make a Seasonal Decomposition of Time Series by Loess per group of pixels

Usage

1
STLperArea(TS, area, outfile = FALSE, Ystart, period = 36, fct = "mean", SGfilter = TRUE, nSG = "5,5", DSG = 0)

Arguments

TS

matrix or data.frame containing the time series (one row per time series).

area

factor which group pixels of the same area together (applying fct per area)

outfile

name of the file where the decomposition is saved (extension ".pdf").
If outfile=FALSE, the graphs are not saved but displayed in the R graphic console. By default, outfile = FALSE.

Ystart

starting year of the analysis (in four-digit format).

period

number of observations per year.
For VGT's dataset : period=36, GIMMS's dataset: period=24.

fct

function to be applied to group points from the same area : "mean", "max" or "min". By default fct="mean".

SGfilter

logical value indicating the application of Savitzky-Golay (SG) filter on time series By default SGfilter=TRUE

nSG

parameters of the windows of the SG filter.
By default nSG="5,5" (windows 5,5).

DSG

parameters of the degree polynome of the SG filter. By default, DSG=0.

Value

The output of STLperArea is the time series computed (mean/max of the time series grouped by area and with/without Savitzky-Golay filter).

Author(s)

Romain Frelat and Bruno Gerard

See Also

TimeSeriesAnalysis,BfastDec

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#loading the data
data(SLPSAs_full)

#formating the time series
ts = normNDVI(SLPSAs_full$full, SLPSAs_full$maxNDVI)

#STLperArea

signal=STLperArea(ts, area = SLPSAs_full$full$name, 
    Ystart = SLPSAs_full$Ystart, period = SLPSAs_full$period)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.