{"id":32207413,"url":"https://github.com/rajohansen/waterquality","last_synced_at":"2025-10-22T05:52:56.862Z","repository":{"id":56934113,"uuid":"112521280","full_name":"RAJohansen/waterquality","owner":"RAJohansen","description":"Package designed to detect and quantify water quality and cyanobacterial harmful algal bloom (CHABs) from remotely sensed imagery","archived":false,"fork":false,"pushed_at":"2024-03-25T15:24:52.000Z","size":35271,"stargazers_count":47,"open_issues_count":3,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-22T05:52:49.398Z","etag":null,"topics":["algal-bloom","algorithms","landsat-8","meris","modis","olci","remote-sensing","sentinel-2","water-quality"],"latest_commit_sha":null,"homepage":"https://rajohansen.github.io/waterquality/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RAJohansen.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-11-29T19:57:14.000Z","updated_at":"2025-07-18T11:21:50.000Z","dependencies_parsed_at":"2024-01-15T05:10:03.820Z","dependency_job_id":"b3d1b78e-2cde-472f-afe2-77bfd4054168","html_url":"https://github.com/RAJohansen/waterquality","commit_stats":{"total_commits":330,"total_committers":6,"mean_commits":55.0,"dds":0.6151515151515152,"last_synced_commit":"b34598325315eeebdf268e33c53a967a8884df5f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/RAJohansen/waterquality","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RAJohansen%2Fwaterquality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RAJohansen%2Fwaterquality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RAJohansen%2Fwaterquality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RAJohansen%2Fwaterquality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RAJohansen","download_url":"https://codeload.github.com/RAJohansen/waterquality/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RAJohansen%2Fwaterquality/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280389298,"owners_count":26322507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algal-bloom","algorithms","landsat-8","meris","modis","olci","remote-sensing","sentinel-2","water-quality"],"created_at":"2025-10-22T05:52:53.560Z","updated_at":"2025-10-22T05:52:56.858Z","avatar_url":"https://github.com/RAJohansen.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n[![CRAN status](http://www.r-pkg.org/badges/version/waterquality)](https://cran.r-project.org/package=waterquality)\n[![codecov](https://codecov.io/gh/RAJohansen/waterquality/branch/master/graph/badge.svg)](https://app.codecov.io/gh/RAJohansen/waterquality)\n![downloads](http://cranlogs.r-pkg.org/badges/grand-total/waterquality)\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n# waterquality\n\nThe 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. \nCurrently, this package is able to process [40 algorithms](https://rajohansen.github.io/waterquality/reference/index.html) for the following satellite-based imagers: WorldView-2, Sentinel-2, Landsat-8, MODIS, MERIS, and OLCI.\nIn 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.\nAdditional functionality of the package includes a series of `extract_lm()` functions that wrap the [\"Fitting Linear Models\"](https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/lm) and [\"caret\"](https://topepo.github.io/caret/index.html) packages to quickly generate crossvalidated linear models and standardized outputs (r^2^, p-value, slope, intercept of the global lm model \u0026 average r^2^, average RMSE, average MAE of crossvalidated model) for any number of algorithm and water quality parameter combinations. \nIt is important to note that the `extract_lm()` functions require ground-truth data in order to develop the models. \nFor a more detailed look into the full functionality of **waterquality**, please view [\"Introduction to the waterquality package\"](https://rajohansen.github.io/waterquality/articles/waterquality_vignette.html). \nFor 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\"](https://erdc-library.erdc.dren.mil/jspui/bitstream/11681/35053/3/ERDC-EL%20TR-19-20.pdf).  \n\nAdditionally, 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”](https://hdl.handle.net/11681/42240).\n\n## Installation\n\nYou can install the released version from CRAN with:\n\n```{r install_CRAN, eval = FALSE}\ninstall.packages(\"waterquality\")\n```\n\nYou can install waterquality from github with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"RAJohansen/waterquality\")\n```\n\n## Basic Example\n\nThe main function in this package is `wq_calc()`:\n\n```{r example_code, fig.asp=0.33, results='hide', message=FALSE, warning=FALSE}\nlibrary(waterquality)\nlibrary(terra)\ns2 = terra::rast(system.file(\"raster/S2_Harsha.tif\", package = \"waterquality\"))\nMM12NDCI = wq_calc(s2, alg = \"MM12NDCI\", sat = \"sentinel2\")\n```\n```{r,fig.height = 5, fig.width = 6}\nMap_WQ_raster(WQ_raster = MM12NDCI,\n              map_title= \"Water Quality Map\",\n              raster_style = \"quantile\",\n              histogram = TRUE)\n```\n\n## Citation\nTo cite waterquality in publications, please use:\n\nJohansen R, Nowosad J, Reif M, Emery E (2023). waterquality: Satellite Derived Water Quality Detection Algorithms.\nU.S Army Engineer Research and Development Center, Vicksburg, MS, USA. R package version 1.0.0,\nhttps://github.com/RAJohansen/waterquality/.\n\n## Package Contributions\n\nWe encourage users to submit issues and enhancement requests so we may continue to improve our package. \n\nFurthermore, 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 Richard.A.Johansen@erdc.dren.mil.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajohansen%2Fwaterquality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajohansen%2Fwaterquality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajohansen%2Fwaterquality/lists"}