Learn R Programming

tidyhydat (version 0.3.2)

hy_plot: Convenience function to plot realtime data

Description

This is an easy way to visualize a single station using base R graphics. More complicated plotting needs should consider using ggplot2. Inputting more 5 stations will result in very busy plots and longer load time. Legend position will sometimes overlap plotted points.

Usage

hy_plot(station_number = NULL, Parameter = c("Flow", "Level", "Suscon",
  "Load"))

Arguments

station_number

A (or several) seven digit Water Survey of Canada station number.

Parameter

Parameter of interest. Either "Flow" or "Level".

Value

A plot of recent realtime values

Examples

Run this code
# NOT RUN {
## One station
hy_plot("08MF005")

## Multiple stations
hy_plot(c("07EC002","01AD003"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab