Advertisement
RichardRogers

UpdatedShinyUIFunction.R

May 29th, 2024
896
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 2.53 KB | Source Code | 0 0
  1. ui <- fluidPage(
  2.  
  3.   theme = shinytheme(Config$DashboardTheme),
  4.  
  5.   # App title ----
  6.   titlePanel(Config$DashboardTitle),
  7.  
  8.   navbarPage(
  9.     "Tabs:",
  10.  
  11.     tabPanel("Frequency",
  12.  
  13.       sidebarLayout(
  14.  
  15.         # Sidebar panel for inputs ----
  16.         sidebarPanel(
  17.           selectInput(
  18.             inputId = "UIFreq",
  19.             label = "Frequency By",
  20.             choices = Frequencies,
  21.             selected = Frequencies[1]
  22.           ),
  23.  
  24.           selectInput(
  25.             inputId = "UIYear",
  26.             label = "Year",
  27.             choices = RiderYears$cyclingyear,
  28.             selected = RiderYears$cyclingyear[1],
  29.           ),
  30.  
  31.           selectInput(
  32.             inputId = "UIQuarter",
  33.             label = "Quarter",
  34.             choices = Quarters$Quarter,
  35.             selected = Quarters$Quarter[1]
  36.           ),
  37.  
  38.           selectInput(
  39.             inputId = "UIMonth",
  40.             label = "Month",
  41.             choices = Months$Months,
  42.             selected = Months$Months[1]
  43.           )
  44.         ), # sidebarPanel
  45.  
  46.         mainPanel(
  47.           # fluidRow(
  48.           #   # plotlyOutput("DistPlot")
  49.           # ) # fluidRow
  50.  
  51.           # textOutput("Plot1")
  52.           fluidRow(
  53.             plotOutput("Plot1")
  54.           )
  55.  
  56.         ) # mainPanel
  57.  
  58.       ) # sidebarLayout
  59.     ), # tabPanel("Frequency")
  60.  
  61.     tabPanel("Best of",
  62.       sidebarLayout(
  63.  
  64.         # Sidebar panel for inputs ----
  65.         sidebarPanel(
  66.           selectInput(
  67.             inputId = "UIBestOfFreq",
  68.             label = "Best of",
  69.             choices = BestOf,
  70.             selected = BestOf[1]
  71.           ),
  72.  
  73.           selectInput(
  74.             inputId = "UIYear",
  75.             label = "Year",
  76.             choices = RiderYears$cyclingyear,
  77.             selected = RiderYears$cyclingyear[1]
  78.           ),
  79.  
  80.           selectInput(
  81.             inputId = "UIQuarter",
  82.             label = "Quarter",
  83.             choices = Quarters$Quarter,
  84.             selected = Quarters$Quarter[1]
  85.           ),
  86.  
  87.           selectInput(
  88.             inputId = "UIMonth",
  89.             label = "Month",
  90.             choices = Months$Months,
  91.             selected = Months$Months[1]
  92.           )
  93.         ), # sidebarPanel
  94.  
  95.         mainPanel(
  96.           fluidRow(
  97.             plotOutput("Plot2")
  98.           ) # fluidRow
  99.         ) # mainPanel
  100.  
  101.       ) # sidebarLayout
  102.     ), # tabPanel("Best of")
  103.  
  104.     tabPanel("Cities by Name", verbatimTextOutput("T1")),
  105.     tabPanel("City Map",       verbatimTextOutput("T2"))
  106.  
  107.   ) # navbarPage()
  108.  
  109. ) # fluidPage
  110.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement