R/mod_demographics_ui.R

Defines functions mod_demographics_server mod_demographics_ui

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

#' demographics UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
#' @keywords internal
mod_demographics_ui <- function(id){
  ns <- NS(id)
  tagList( 
   tabsetPanel(type = "tabs",
         tabPanel(title= "Age and Gender",
                  mod_plotviz_ui(ns("demographics1"),
                  thisPlot = "plot_ctr_pyramid" ) ) #,
         
         # tabPanel(title= "Location",
         #          mod_plotviz_ui(ns("demographics2"), 
         #          thisPlot = "plot_ctr_location" ) )
      ) ## End Tabset 
  )
}
    
#' demographics Server Functions
#'
#' @noRd 
#' @import ggplot2
#' @import shiny
#' @keywords internal
mod_demographics_server <- function(id, reactiveParameters){
  moduleServer( id, function(input, output, session){
    ns <- session$ns 
   mod_plotviz_server("demographics1", 
                      thisPlot = "plot_ctr_pyramid", 
                      reactiveParameters ) 
   # mod_plotviz_server("demographics2", 
   #                    thisPlot = "plot_ctr_location", 
   #                    reactiveParameters ) 
 
  })
}
    
## To be copied in the UI
# mod_demographics_ui("demographics_1")
    
## To be copied in the server
# mod_demographics_server("demographics_1")
Edouard-Legoupil/unhcrdatapackage documentation built on Nov. 6, 2023, 6:10 p.m.