MyNixOS website logo
Description

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) <doi:10.21079/11681/35053>.

CRANstatus codecov downloads

waterquality

The main purpose of waterquality is to quickly and easily convert satellite-based reflectance imagery into one or many well-known water quality indices designed for the detection of Harmful Algal Blooms (HABs) using the following pigment proxies: chlorophyll-a, blue-green algae (phycocyanin), and turbidity. Currently, this package is able to process 40 algorithms for the following satellite-based imagers: WorldView-2, Sentinel-2, Landsat-8, MODIS, MERIS, and OLCI. In order to improve the aesthetics of the wq_calc() output, a series of Map_WQ() functions were developed to help reduce technical barriers and simplify the complexities in selecting a map layout. Additional functionality of the package includes a series of extract_lm() functions that wrap the “Fitting Linear Models” and “caret” packages to quickly generate crossvalidated linear models and standardized outputs (r2, p-value, slope, intercept of the global lm model & average r2, average RMSE, average MAE of crossvalidated model) for any number of algorithm and water quality parameter combinations. It is important to note that the extract_lm() functions require ground-truth data in order to develop the models. For a more detailed look into the full functionality of waterquality, please view “Introduction to the waterquality package”. For a broader look into how to apply this tool into a research workflow or for more information on topics such as data acquisition, image pre-processing, or results, see our publication entitled “Waterquality: An Open-Source R Package for the Detection and Quantification of Cyanobacterial Harmful Algal Blooms and Water Quality”.

Additionally, we have recently developed and published a complementary python-based version of waterquality compatible with ESRI ArcGIS and ArcPro. For more information please visit “waterquality for ArcGIS Pro Toolbox”.

Installation

You can install the released version from CRAN with:

install.packages("waterquality")

You can install waterquality from github with:

# install.packages("devtools")
devtools::install_github("RAJohansen/waterquality")

Basic Example

The main function in this package is wq_calc():

library(waterquality)
library(terra)
s2 = terra::rast(system.file("raster/S2_Harsha.tif", package = "waterquality"))
MM12NDCI = wq_calc(s2, alg = "MM12NDCI", sat = "sentinel2")
Map_WQ_raster(WQ_raster = MM12NDCI,
              map_title= "Water Quality Map",
              raster_style = "quantile",
              histogram = TRUE)
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#>      (status 2 uses the sf package in place of rgdal)

Citation

To cite waterquality in publications, please use:

Johansen R, Nowosad J, Reif M, Emery E (2023). waterquality: Satellite Derived Water Quality Detection Algorithms. U.S Army Engineer Research and Development Center, Vicksburg, MS, USA. R package version 1.0.0, https://github.com/RAJohansen/waterquality/.

Package Contributions

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

Furthermore, 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 [email protected].

Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows