R/mod_migrants_ui.R

Defines functions mod_migrants_server mod_migrants_ui

# WARNING - Generated by {fusen} from /dev/dev_golem_module.Rmd: do not edit by hand

#' migrants UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
#' @keywords internal
mod_migrants_ui <- function(id){
  ns <- NS(id)
  tagList(
   tabsetPanel(type = "tabs",
         tabPanel(title= "Migration and Displacement",
                  mod_plotviz_ui(ns("migrants1"),
                  thisPlot = "plot_ctr_disp_migrant" ) ) 
      ) ## End Tabset
  )
  
}
    
#' migrants Server Functions
#' @param reactiveParameters  Main app filters defined through mod_input
#'
#' @noRd 
#' @import ggplot2
#' @import shiny
#' @keywords internal
mod_migrants_server <- function(id, reactiveParameters){
  moduleServer( id, function(input, output, session){
    ns <- session$ns 
       mod_plotviz_server("migrants1", 
                          thisPlot = "plot_ctr_disp_migrant",
                          reactiveParameters ) 
  })
}
    
## To be copied in the UI
# mod_migrants_ui("migrants_1")
    
## To be copied in the server
# mod_migrants_server("migrants_1")
Edouard-Legoupil/unhcrdatapackage documentation built on Nov. 6, 2023, 6:10 p.m.