Skip to contents

Shiny module for point verification dashboard

Usage

dashboard_point_verifUI(id)

dashboard_point_verif(
  input,
  output,
  session,
  verif_data,
  colour_table,
  time_axis
)

Arguments

id

An ID string for the module's UI

input

input reactive

output

output reactive

session

Session from which to make a child scope (the default should almost always be used).

verif_data

verification data as a reactive value

colour_table

A reactive data frame in a format suitable for the colour_table argument to plot_point_verif

time_axis

A reactive string giving the name of the time axis to use as the x-axis in the dashboard. Mut be one of "lead_time", "valid_dttm", or "valid_hour" and the column must exist in verif_data.

Examples


# Run examples link doesn't work for shiny apps in RStudio. Copy-paste
# example to console to run.

library(shiny)

# Set the theme to white
shinyOptions(theme = "white")

ui <- fluidPage(
  fluidRow(
    column(12, dashboard_point_verifUI("dshbrd"))
  )
)

server <- function(input, output, session) {
  col_tbl <- data.frame(
    fcst_model = unique(verif_data_ens$ens_summary_scores$fcst_model),
    colour     = c("red", "blue")
  )
  callModule(
    dashboard_point_verif, "dshbrd", reactive(verif_data_ens),
    reactive(col_tbl), reactive("lead_time")
  )
}

if (interactive()) {
  shinyApp(ui, server)
}