Skip to contents

Creates a horizontal dotplot showing GPD return levels by station for a given variable, with error bars for confidence intervals. Text labels at each point replace the legend for clarity.

Usage

create_plot_return_levels_per_station(return_levels_df, variable_filter)

Arguments

return_levels_df

Data frame from return_levels_per_station target with columns: station, variable, return_period, return_level, lower, upper

variable_filter

Character, which variable to plot (one of "avg_wave", "rogue_wave", "avg_wind", "wind_gust")

Value

plotly object, or NULL if no data for the requested variable

Examples

if (FALSE) { # \dontrun{
rl_df <- data.frame(
  station = rep(c("M2", "M3", "M4"), each = 3),
  variable = "avg_wave",
  variable_label = "Avg Wave Height (m)",
  return_period = rep(c(1, 5, 10), 3),
  return_level = runif(9, 4, 12),
  lower = runif(9, 3, 8),
  upper = runif(9, 9, 16)
)
create_plot_return_levels_per_station(rl_df, "avg_wave")
} # }