Package: tidywater 0.6.2

Sierra Johnson

tidywater: Water Quality Models for Drinking Water Treatment Processes

Provides multiple water chemistry-based models and published empirical models in one standard format. Functions can be chained together to model a complete treatment process and are designed to work in a 'tidyverse' workflow. Models are primarily based on these sources: Benjamin, M. M. (2002, ISBN:147862308X), Crittenden, J. C., Trussell, R., Hand, D., Howe, J. K., & Tchobanoglous, G., Borchardt, J. H. (2012, ISBN:9781118131473), USEPA. (2001) <https://www.epa.gov/sites/default/files/2017-03/documents/wtp_model_v._2.0_manual_508.pdf>.

Authors:Sierra Johnson [aut, cre], Libby McKenna [aut], Riley Mulhern [aut], Chris Corwin [aut], Rachel Merrifield [ctb], Mayuri Namasivayam [ctb], USEPA [cph], Brown and Caldwell [fnd, cph]

tidywater_0.6.2.tar.gz
tidywater_0.6.2.zip(r-4.5)tidywater_0.6.2.zip(r-4.4)tidywater_0.6.2.zip(r-4.3)
tidywater_0.6.2.tgz(r-4.4-any)tidywater_0.6.2.tgz(r-4.3-any)
tidywater_0.6.2.tar.gz(r-4.5-noble)tidywater_0.6.2.tar.gz(r-4.4-noble)
tidywater_0.6.2.tgz(r-4.4-emscripten)tidywater_0.6.2.tgz(r-4.3-emscripten)
tidywater.pdf |tidywater.html
tidywater/json (API)
NEWS

# Install 'tidywater' in R:
install.packages('tidywater', repos = c('https://brownandcaldwell-public.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/brownandcaldwell-public/tidywater/issues

Datasets:
  • bromatecoeffs - Data frame of bromate coefficients for predicting bromate formation during ozonation
  • chloramine_conv - Data frame of conversion factors for estimating DBP formation from chloramines
  • dbp_correction - Data frame of correction factors for estimating DBP formation as a function of location
  • dbpcoeffs - Data frame of DBP coefficients for predicting DBP formation
  • discons - Dissociation constants and standard enthalpy for weak acids/bases
  • edwardscoeff - Data frame of Edwards model coefficients
  • leadsol_constants - Data frame of equilibrium constants for lead and copper solubility
  • mweights - Molar weights of relevant compounds
  • water_df - Data frame of water quality parameters

On CRAN:

6.13 score 7 stars 12 scripts 131 downloads 52 exports 50 dependencies

Last updated 7 days agofrom:529a20812c. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 15 2024
R-4.5-winOKNov 15 2024
R-4.5-linuxOKNov 15 2024
R-4.4-winOKNov 15 2024
R-4.4-macOKNov 15 2024
R-4.3-winOKNov 15 2024
R-4.3-macOKNov 15 2024

Exports:%>%balance_ionsbalance_ions_chainbalance_ions_oncebiofilter_tocblend_watersblend_waters_chainblend_waters_oncecalculate_corrosioncalculate_corrosion_chaincalculate_corrosion_oncecalculate_diccalculate_hardnesschemdose_ctchemdose_dbpchemdose_dbp_chainchemdose_dbp_oncechemdose_fchemdose_phchemdose_ph_chainchemdose_ph_oncechemdose_tocchemdose_toc_chainchemdose_toc_onceconvert_unitsconvert_waterconvert_watermgdefine_waterdefine_water_chaindefine_water_oncedissolve_pbdissolve_pb_onceozonate_bromateozonate_ctpac_tocpac_toc_chainpac_toc_onceplot_ionspluck_watersolvecost_chemsolvecost_laborsolvecost_powersolvecost_solidssolvedose_alksolvedose_alk_oncesolvedose_phsolvedose_ph_oncesolvemass_chemsolveresid_o3solveresid_o3_oncesummarise_wqsummarize_wq

Dependencies:clicodetoolscolorspacecpp11digestdplyrevaluatefansifarverfurrrfuturegenericsggplot2ggrepelglobalsgluegtablehighrisobandknitrlabelinglatticelifecyclelistenvmagrittrMASSMatrixmgcvmunsellnlmeparallellypillarpkgconfigpurrrR6RColorBrewerRcpprlangscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithrxfunyaml

Getting started with tidywater

Rendered fromtidywater.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-10-22
Started: 2024-10-22

Helper Functions: Blending Multiple Waters

Rendered fromhelp_functions_blend_waters.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-11-15
Started: 2024-10-22

Helper Functions: Dose chemicals

Rendered fromhelp_functions_chemdose_ph.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-11-15
Started: 2024-10-22

Introduction to tidywater: Basic functions

Rendered fromintro.Rmdusingknitr::rmarkdownon Nov 15 2024.

Last update: 2024-10-22
Started: 2024-10-22

Readme and manuals

Help Manual

Help pageTopics
Add Na, K, Cl, or SO4 to balance overall charge in a waterbalance_ions
Apply `balance_ions` within a dataframe and output a column of `water` class to be chained to other tidywater functionsbalance_ions_chain
Apply `balance_ions` function and output a dataframebalance_ions_once
Determine TOC removal from biofiltration using Terry & Summers BDOC modelbiofilter_toc
Determine blended water quality from multiple waters based on mass balance and acid/base equilibriumblend_waters
Apply `blend_waters` within a dataframe and output a column of `water` class to be chained to other tidywater functionsblend_waters_chain
Apply `blend_waters` to a dataframe and output `water` slots as a dataframeblend_waters_once
Data frame of bromate coefficients for predicting bromate formation during ozonationbromatecoeffs
Calculate six corrosion and scaling indices (AI, RI, LSI, LI, CSMR, CCPP)calculate_corrosion
Apply `calculate_corrosion` to a dataframe and output a column of `water` class to be chained to other tidywater functions.calculate_corrosion_chain
Apply `calculate_corrosion` to a dataframe and create new columns with up to 6 corrosion indicescalculate_corrosion_once
Calculate dissolved inorganic carbon (DIC) from total carbonatecalculate_dic
Calculate hardness from calcium and magnesiumcalculate_hardness
Determine disinfection credit from chlorine.chemdose_ct
Calculate DBP formationchemdose_dbp
Apply `chemdose_dbp` within a data frame and output a column of `water` class to be chained to other tidywater functionschemdose_dbp_chain
Apply `chemdose_dbp`function within a data frame and output a data framechemdose_dbp_once
Calculate new fluoride concentration after dosing alum.chemdose_f
Calculate new pH and ion balance after chemical additionchemdose_ph
Apply `chemdose_ph` within a dataframe and output a column of `water` class to be chained to other tidywater functionschemdose_ph_chain
Apply `chemdose_ph` function and output a dataframechemdose_ph_once
Determine TOC removal from coagulationchemdose_toc
Apply `chemdose_toc` within a dataframe and output a column of `water` class to be chained to other tidywater functionschemdose_toc_chain
Apply `chemdose_toc` function and output a data framechemdose_toc_once
Data frame of conversion factors for estimating DBP formation from chloramineschloramine_conv
Calculate unit conversions for common compoundsconvert_units
Convert `water` class object to a dataframeconvert_water
Convert a `water` class object to a dataframe with ions in mg/L or ug/Lconvert_watermg
Data frame of correction factors for estimating DBP formation as a function of locationdbp_correction
Data frame of DBP coefficients for predicting DBP formationdbpcoeffs
Create a water class object given water quality parametersdefine_water
Apply `define_water` within a dataframe and output a column of `water` class to be chained to other tidywater functionsdefine_water_chain
Apply `define_water` and output a dataframedefine_water_once
Dissociation constants and standard enthalpy for weak acids/basesdiscons
Simulate contributions of various lead solids to total soluble leaddissolve_pb
Apply `dissolve_pb` to a dataframe and create a new column with numeric dosedissolve_pb_once
Data frame of Edwards model coefficientsedwardscoeff
Data frame of equilibrium constants for lead and copper solubilityleadsol_constants
Molar weights of relevant compoundsmweights
Calculate bromate formationozonate_bromate
Determine disinfection credit from ozone.ozonate_ct
Calculate DOC Concentration in PAC systempac_toc
Apply `pac_toc` within a data frame and output a column of `water` class to be chained to other tidywater functions PAC = powdered activated carbonpac_toc_chain
Apply `pac_toc`function within a data frame and output a data framepac_toc_once
Create summary plot of ions from water classplot_ions
Pluck out a single parameter from a `water` class objectpluck_water
Determine chemical costsolvecost_chem
Determine labor costsolvecost_labor
Determine power costsolvecost_power
Determine solids disposal costsolvecost_solids
Calculate a desired chemical dose for a target alkalinitysolvedose_alk
Apply `solvedose_alk` to a dataframe and create a new column with numeric dosesolvedose_alk_once
Calculate a desired chemical dose for a target pHsolvedose_ph
Apply `solvedose_ph` to a dataframe and create a new column with numeric dosesolvedose_ph_once
Convert mg/L of chemical to lb/daysolvemass_chem
Determine ozone decaysolveresid_o3
Apply `solveresid_o3` to a data frame and create a new column with residual ozone dosesolveresid_o3_once
Create summary table from water classsummarise_wq summarize_wq
Data frame of water quality parameterswater_df