This function generates a simple visualization of Urban Water Data.

plot_data(
  data,
  category_selection = c("supply", "supply total", "demand", "demand total", "losses"),
  pwsid_selection,
  show_subcategories = FALSE
)

Arguments

data

Data to plot. Must be in the format outputted from pull_data() function

category_selection

The category that the user would like plotted. Coverage across reporting requirements varies by category. Can be "supply", "supply total", "demand", "demand total", "losses"

pwsid_selection

The Public Water System Identification Number (PWSID) corresponding to the agency whose data you would like to visualize.

show_subcategories

Defaults to FALSE. If set to TRUE shows subcategories for use types.

Examples

if (FALSE) {
pull_data(2020) |>
    plot_data(category_selection = "demand", pwsid = "CA3610001")
}