#' The application server-side
#'
#' @param input,output,session Internal parameters for {shiny}.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_server <- function(input, output, session) {
# Your application server logic
ve_reactive <- reactiveVal()
burden_reactive <- reactiveVal()
uptake_reactive <- reactiveVal()
mod_ve_server("ve", input, ve_reactive)
mod_uptake_server("uptake", input, uptake_reactive)
mod_burden_server("burden", input, burden_reactive)
mod_prevention_server("prevention", ve_reactive, uptake_reactive, burden_reactive)
mod_maps_server("maps")
}
#' @importFrom shiny.quartz QCard Container Item QSelect.shinyInput make_options AcknowledgementCard
#' @importFrom shiny.mui Divider Alert Autocomplete.shinyInput Tabs.shinyInput Tab
app_ui <- function(request) {
shiny.quartz::Page("",
shiny.mui::Container(maxWidth = "lg",
Container(spacing = 4,
Item(xs = 12,
Tabs.shinyInput("tabs", value = "global", Tab(value = "global", label = "Global"), Tab(value = "us", label = "US")),
conditionalPanel(condition = "input.tabs == 'global'",
mod_maps_ui("maps")
),
conditionalPanel(condition = "input.tabs == 'us'",
QCard(
title = "VE, Uptake, and Burden",
Alert(severity = "info", "Use data pooled from several IDDR datasets to calculate historical vaccine effectiveness, vaccine uptake, and influenza burden stratified by season and age group.", sx = list(mb = 2)),
Container(
spacing = 1,
Item(xs = 12,
Autocomplete.shinyInput("seasons", inputProps = list(label = "Season(s)"), value = shiny.fluToolkit::global_seasons, options = shiny.fluToolkit::global_seasons, md = 6, multiple = T, disableCloseOnSelect = T)
),
Item(xs = 12,
Autocomplete.shinyInput("ages", inputProps = list(label = "Age Group(s)"), options = shiny.fluToolkit::global_age_groups, value = shiny.fluToolkit::global_age_groups, md = 6, multiple = T, disableCloseOnSelect= T)
),
Item(xs = 12, sm = 12, md = 6,
mod_ve_ui("ve")
),
Item(xs = 12, sm = 12, md = 6,
mod_uptake_ui("uptake")
),
Item(xs = 12, mod_burden_ui("burden")),
Item(xs = 12, mod_prevention_ui("prevention"))
)
))
),
Item(
xs = 12,
shiny.quartz::AcknowledgementCard()
)
))
)
}
ggthemr::ggthemr("flat")
#' @export
run_app <- function() {
shiny::shinyApp(
server = app_server,
ui = app_ui,
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.