Using filtered NDVI time series, scale it to 0-1.

scale_ndvi(DT)

Arguments

DT

data.table of NDVI time series

Value

data.table with appended 'scaled' column of 0-1 scaled NDVI.

Details

This functions expects the input DT is the output of previous four filtering steps, or filter_ndvi.

See also

Other scale: scale_doy

Examples

# Load data.table library(data.table) # Read in example data ndvi <- fread(system.file("extdata", "ndvi.csv", package = "irg")) # Filter and scale NDVI time series filter_ndvi(ndvi)
#> id yr DayOfYear NDVI SummaryQA filtered winter rolled top #> 1: 7652 2002 3 -1367 3 4099 4099 4099 7443.400 #> 2: 7035 2002 14 -304 3 5382 5382 5382 7462.900 #> 3: 4368 2002 1 374 2 3702 3702 3702 6709.800 #> 4: 5196 2002 15 635 3 5180 5180 5180 7288.100 #> 5: 12377 2002 9 685 2 4621 4621 4621 7645.100 #> --- #> 2526: 13322 2012 356 1257 2 4708 4708 4708 7776.250 #> 2527: 9537 2012 356 144 2 4536 4536 4536 7155.475 #> 2528: 18592 2012 362 1031 2 4011 4011 4011 7184.300 #> 2529: 2163 2012 356 2172 2 5022 5022 5022 7566.600 #> 2530: 2941 2012 356 -197 2 2839 2839 2839 5491.750
scale_ndvi(ndvi)
#> id yr DayOfYear NDVI SummaryQA filtered winter rolled top #> 1: 7652 2002 3 -1367 3 4099 4099 4099 7443.400 #> 2: 7035 2002 14 -304 3 5382 5382 5382 7462.900 #> 3: 4368 2002 1 374 2 3702 3702 3702 6709.800 #> 4: 5196 2002 15 635 3 5180 5180 5180 7288.100 #> 5: 12377 2002 9 685 2 4621 4621 4621 7645.100 #> --- #> 2526: 13322 2012 356 1257 2 4708 4708 4708 7776.250 #> 2527: 9537 2012 356 144 2 4536 4536 4536 7155.475 #> 2528: 18592 2012 362 1031 2 4011 4011 4011 7184.300 #> 2529: 2163 2012 356 2172 2 5022 5022 5022 7566.600 #> 2530: 2941 2012 356 -197 2 2839 2839 2839 5491.750 #> scaled #> 1: 0 #> 2: 0 #> 3: 0 #> 4: 0 #> 5: 0 #> --- #> 2526: 0 #> 2527: 0 #> 2528: 0 #> 2529: 0 #> 2530: 0