#Purpose This package was developed for processing, modeling, cross-validation, and analysis of water quality conditions (specifically chl-a).
#Example analysis One useful analysis that can be done with this package is evaluating trends in the timing of maximum chl-a conditions.
library(RSAlgaeR) #Load a record of water quality data wqrecord <- readRDS('EstimatedRecord.rds') #Use doy.max.trend function to find the location, value, and day of year when the maximum value occured wqdoytrend <- doy.max.trend(data=wqrecord,date="ImageDate",value="Chla",location="StationID")
This function calculates the DOY when the maximum value occurs, where this occured, and returns a list containing a dataframe of the annual maxima information, summary of the model fit (DOY vs year) and a plot of the DOY of maximum vs year.
#Installation instructions The package can be installed and loaded using the following commands:
#An overview that describes the main components of the package.
This includes formatting dates, removing negative values, cloud pixels, etc. (See
sampleformatreflectancedata.R script for example which uses
Use glm() to develop the final model, based on an appropriate season, timewindow, and parameters.
(Optional) Use the
step.model function (stepwise regression based on a user-specified timewindow) to explore performance for various parameters, definitions of near coincident data and seasons. Examine model performance using k-fold cross validation and exploring the goodness of fit (
Apply the model to remotely sensed imagery for a user-specified season using
Long term, linear changes in values/year can be explored using the Theil-Sen Estimator, which is more robust than a simple OLS regression. * Annually:
annualtrend.ts * Monthly: