Skip to contents

Calculate water quality scores for nutrients

Usage

assess_wq_nutrients(
  df,
  parameter_name,
  piedmont_criteria,
  coastal_plain_criteria
)

Arguments

df

DOEE Ambient Water Quality Data that has been processed and formatted

parameter_name

String to indicate target parameter: "Nitrogen", "Phosphorus, Total (as P)"

piedmont_criteria

Nutrient criteria recommendation for Piedmont Ecoregion 64 in mg/L

coastal_plain_criteria

Nutrient criteria recommendation for Coastal Plain Ecoregion 65 in mg/L

Value

List of three dataframes: results, summary, score

Examples

assess_wq_nutrients(df_wq_processed_example,
                              parameter_name = "Phosphorus, Total (as P)",
                              piedmont_criteria = 0.04,
                              coastal_plain_criteria = 0.0225)
#> $results
#> # A tibble: 28 × 12
#>    sample_id  location_id date       parameter            unit  result qualifier
#>    <chr>      <chr>       <date>     <chr>                <chr>  <dbl> <chr>    
#>  1 20C0524-02 TNS01       2020-03-03 Phosphorus, Total (… mg/l   0.016 ""       
#>  2 20C0524-03 TDA01       2020-03-03 Phosphorus, Total (… mg/l   0.12  ""       
#>  3 20C0524-04 TBK01       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#>  4 20C0524-06 TFB02       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#>  5 20C0524-07 TDO01       2020-03-03 Phosphorus, Total (… mg/l   0.046 ""       
#>  6 20C0524-10 RCR09       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#>  7 20C0524-11 TKV01       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#>  8 20C0524-12 TPY01       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#>  9 20C0524-13 TMH01       2020-03-03 Phosphorus, Total (… mg/l   0.021 ""       
#> 10 20C0524-14 TBR01       2020-03-03 Phosphorus, Total (… NA     0.01  "<"      
#> # ℹ 18 more rows
#> # ℹ 5 more variables: location_name <chr>, sci_subshed <chr>, ecoregion <chr>,
#> #   excursion <dbl>, outside_limit <dbl>
#> 
#> $summary
#> # A tibble: 25 × 9
#>    sci_subshed    n_tests n_tests_failed excursion   nse    f2    f3   wqi score
#>    <chr>            <int>          <dbl>     <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 Battery Kembl…       1              0     0     0         0   0   100   10   
#>  2 Broad Branch         1              0     0     0         0   0   100   10   
#>  3 Dalecarlia Tr…       1              1     2     2       100  66.7  15.0  1.50
#>  4 Dumbarton Oaks       1              1     0.150 0.150   100  13.0  28.7  2.87
#>  5 Fenwick Branch       1              0     0     0         0   0   100   10   
#>  6 Fort Chaplin …       1              0     0     0         0   0   100   10   
#>  7 Fort Davis Tr…       1              1     1.44  1.44    100  59.1  17.9  1.79
#>  8 Fort Dupont T…       1              0     0     0         0   0   100   10   
#>  9 Fort Stanton …       1              0     0     0         0   0   100   10   
#> 10 Foundry Branch       1              0     0     0         0   0   100   10   
#> # ℹ 15 more rows
#> 
#> $score
#> # A tibble: 25 × 2
#>    sci_subshed            `Phosphorus, Total (as P)`
#>    <chr>                                       <dbl>
#>  1 Battery Kemble Creek                        10   
#>  2 Broad Branch                                10   
#>  3 Dalecarlia Tributary                         1.50
#>  4 Dumbarton Oaks                               2.87
#>  5 Fenwick Branch                              10   
#>  6 Fort Chaplin Tributary                      10   
#>  7 Fort Davis Tributary                         1.79
#>  8 Fort Dupont Tributary                       10   
#>  9 Fort Stanton Tributary                      10   
#> 10 Foundry Branch                              10   
#> # ℹ 15 more rows
#>