library(ggplot2)
# River flow rates by site
ggplot(flow_rates, aes(x = site, y = flow)) +
geom_boxplot() +
labs(
title = "River flow rates by site",
x = "Site",
y = expression(paste("Flow (ft"^3 * "/s)"))
)
# River flow rates over time
ggplot(flow_rates, aes(x = date, y = flow, color = site, shape = site)) +
geom_point(size = 2) +
labs(
title = "River flow rates over time",
x = "Date",
y = expression(paste("Flow (ft"^3 * "/s)")),
color = "Site", shape = "Site"
)
Run the code above in your browser using DataLab