Satellite Derived Water Quality Detection Algorithms

The main purpose of waterquality is to quickly and easily convert satellite-based reflectance imagery into one or many well-known water quality algorithms designed for the detection of harmful algal blooms or the following pigment proxies: chlorophyll-a, blue-green algae (phycocyanin), and turbidity. Johansen et al. (2019) .

CRAN status Build Status codecov CRAN RStudio mirror downloads


The goal of waterquality is to convert satellite-reflectance imagery to a host of pre-defined water quality algorithms designed for the detection of cholorophyll-a, blue-green algae (Phycocyanin), and Turbidity. This package is able to process the following sensor configurations: WorldView-2, Sentinel-2, Landsat-8, MODIS, and MERIS sensors.


You can install waterquality from github with:



The main function in this package is wq_calc():

#> Loading required package: sp
s2 = stack(system.file("raster/S2_Harsha.tif", package = "waterquality"))
s2_two_alg = wq_calc(s2, alg = c("TurbChip09NIROverGreen", "Be16FLHGreenRedNIR"), sat = "sentinel2")
#> Be16FLHGreenRedNIR calculated!
#> TurbChip09NIROverGreen calculated!

To learn more read the "Introduction to the waterquality package" vignette.

Package Contributions

We encourage users to submit issues and enhancement requests so we may continue to improve our package.

Futhermore, if you have a water quality algorithm that was not on our list, and you would like for it to be included in our package please email me at [email protected].


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.6 by Richard Johansen, 6 months ago

Report a bug at

Browse source code at

Authors: Richard Johansen [aut, cre] , Jakub Nowosad [aut] , Molly Reif [aut] , Erich Emery [aut] , U.S. Army Corps of Engineers [fnd]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports methods, raster, rgdal, purrr, caret, vctrs, magrittr, dplyr, pingr

Suggests testthat, knitr, tibble, rmarkdown, covr, tmap, tmaptools, OpenStreetMap, sf

See at CRAN