Schoeller Diagram
schoeller_plot(df, location_id = "location_id", sample_date = "sample_date", param_name = "param_name", analysis_result = "analysis_result", default_unit = "default_unit", calcium = "Calcium, dissolved", magnesium = "Magnesium, dissolved", sodium = "Sodium, dissolved", potassium = "Potassium, dissolved", chloride = "Chloride, total", alkalinity = "Alkalinity, total (lab)", sulfate = "Sulfate, total", facet_var = "location_id", title = NULL, lwt = 1)
| df | dataframe of environmental data in tidy format. The function will convert data from mg/L to meq/L |
|---|---|
| location_id | the column for sample locations |
| sample_date | column for sample date |
| param_name | the column of parameter names |
| analysis_result | column containing the numerical analysis result |
| default_unit | column containing the units. Assumes mg/L. |
| calcium | name of calcium. Default is "Calcium, dissolved" |
| magnesium | name of magnesium. Default is "Magnesium, dissolved" |
| sodium | name for sodium. Default is "Sodium, dissolved" |
| potassium | name for potassium. Default is "Potassium, dissolved" |
| chloride | name for chloride. Default is "Chloride, total" |
| alkalinity | name for alkalinity. Default is "Alkalinity, total (lab)" |
| sulfate | name of sulfate. Default is "Sulfate, total" |
| facet_var | parameter to facet plots by. Default is location |
| title | title of plot |
| lwt | lineweight |
data(gw_data) gw_data %>% filter(location_id %in% c("MW-1", "MW-2")) %>% schoeller_plot(., facet_var = "location_id", title = "Example Scholler Plot")#> Warning: Removed 5 row(s) containing missing values (geom_path).gw_data %>% filter(location_id %in% c("MW-1", "MW-2")) %>% schoeller_plot(., facet_var = "sample_date", lwt = 2)#> Error: `scale_id` must not be `NA`