Convenience wrapper around ggplot2::ggplot() for the long tibble
returned by covjson_to_tibble(). Automatically chooses a sensible
view for time series, vertical profiles, and x/y grids.
Arguments
- data
Either a tidy tibble from
covjson_to_tibble()or anedr_response/edr_covjsonobject (which we flatten withcovjson_to_tibble()for you).- parameter
Optional character vector restricting to a subset of parameters.
- group
Column in
dataused for the colour aesthetic. Defaults to"coverage_id"(one colour per location). Set toNULLto disable.- facet
Column to facet by. Defaults to
"parameter"so each variable gets its own panel; passNULLto plot everything on one axis.- scales
facet_wrap()scales argument. Default"free_y"gives each parameter its own y-axis range.- geom
One of
"line","point", or"both".- facet_labels
If
TRUE(default), facet strip labels include the unit (e.g."discharge (ft3/s)").- view
Plot view.
"auto"(default) detects grids from varyingxandy, profiles from varyingz, and otherwise falls back to a time-series view. Set to"time","profile", or"grid"to force a specific layout.
Examples
if (FALSE) { # \dontrun{
cl <- edr_client("https://api.wwdh.internetofwater.app")
resp <- edr_location(cl, "rise-edr",
location_id = 3514,
datetime = "2023-01-01/2023-06-30",
parameter_name = "3")
edr_plot(resp)
} # }