RAJohansen / waterquality

Package designed to detect and quantify water quality and cyanobacterial harmful algal bloom (CHABs) from remotely sensed imagery
https://rajohansen.github.io/waterquality/
Other
42 stars 8 forks source link

Select Algorithms by Type #8

Closed RAJohansen closed 6 years ago

RAJohansen commented 6 years ago

We need to create a argument similar to alg (within alg is fine too) that allows for the selection of algorithms by type (chlorophyll-a, turbidity, or phycocyanin)

***May want to change the name to metric or something more meaningful than type.

Nowosad commented 6 years ago

It should be fine now:

library(raster)
#> Loading required package: sp
library(waterquality)

s2 = stack(system.file("raster/S2_Taylorsville.tif", package = "waterquality"))
s2_wq = wq_calc(s2, alg = "phycocyanin", sat = "sentinel2")
#> Am09KBBI calculated!
#> Go04MCI calculated!
#> Ku15PhyCI calculated!
#> Be16FLHBlueRedNIR calculated!
#> Be16FLHGreenRedNIR calculated!
#> Be16FLHVioletRedNIR calculated!
#> Wy08CI calculated!
#> Da052BDA calculated!
#> Ku15SLH calculated!
#> MM12NDCIalt calculated!
plot(s2_wq)

Created on 2018-06-16 by the reprex package (v0.2.0).