ui.R 3.48 KB
Newer Older
Stephanie's avatar
Stephanie committed
1 2 3 4 5
## app.R ##
library(shiny)
library(shinydashboard)
library(leaflet)

Stephanie's avatar
Stephanie committed
6
ui <- dashboardPage(
7 8
  skin="purple",
  
Stephanie's avatar
Stephanie committed
9 10 11 12 13 14 15 16 17 18
  dashboardHeader(title="CoCoVisR"),
  dashboardSidebar(
    sidebarMenu(
      menuItem("Upload", tabName = "upload", icon =icon("upload")),
      menuItem("Contolls", tabName = "controlls", icon = icon("cog")),
      menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
      menuItem("Help", tabName = "help", icon = icon("book"))
    )
  ),
  dashboardBody(
19 20 21 22
    #tags$head(
    #  tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
    #),
    
Stephanie's avatar
Stephanie committed
23 24 25
    tabItems(
      # Upload tab content
      tabItem(tabName = "upload",
26 27 28 29 30 31 32 33 34 35 36 37 38 39
              h2("Upload here:"),
              fileInput("file1", "Select CoConUT Data (*.json):",
                        multiple = FALSE,
                        accept = c(
                          "text/json",
                          "text/comma-separated-values,text/plain",
                          ".json")),
              fileInput("file2", "Select CoCoQuest Data (*.json):",
                        multiple = FALSE,
                        accept = c(
                          "text/json",
                          "text/comma-separated-values,text/plain",
                          ".json"))
              
Stephanie's avatar
Stephanie committed
40 41 42 43
      ),
      
      # Controlls tab content
      tabItem(tabName = "controlls",
44 45 46 47 48 49 50 51 52
              h2("Controlls here:"),
              checkboxInput("histogram", "Histogram", FALSE),
              #selectInput('in6', 'Data', data.name, multiple=TRUE, selectize=TRUE),
              checkboxInput("timeline", "Timeline", FALSE),
              #selectInput('in6', 'Data', data.name, multiple=TRUE, selectize=TRUE),
              checkboxInput("map", "Map", FALSE),
              #selectInput('in6', 'Data', data.name, multiple=TRUE, selectize=TRUE),
              checkboxInput("lingegraph","Linegraph",FALSE)
              #selectInput('in6', 'Data', data.name, multiple=TRUE, selectize=TRUE)
Stephanie's avatar
Stephanie committed
53 54 55 56 57 58
      ),
      
      # Dashboard tab content
      tabItem(tabName = "dashboard",
              h2("This is the Dashboard"),
              fluidRow(
59 60 61 62 63 64 65 66 67
                #tabBox(
                  #title = "First tabBox",
                  # The id lets us use input$tabset1 on the server to find the current tab
                  #id = "tabset1", height = "250px",
                  #tabPanel("Tab1", "First tab content"),
                  #tabPanel("Tab2", "Tab content 2")
                #),
                
                #if(menuitem$controls$histogram ==TRUE){
Stephanie's avatar
Stephanie committed
68
                box(  title="Histogram",
69
                      status= "warning",
Stephanie's avatar
Stephanie committed
70 71 72
                      solidHeader = TRUE,
                      collapsible = TRUE,
                      plotOutput("plot1", height = 250)),
73 74
                #},

Stephanie's avatar
Stephanie committed
75
                box(title="Map",
76
                    status = "warning",
Stephanie's avatar
Stephanie committed
77 78 79
                    solidHeader = TRUE,
                    collapsible = TRUE,
                    plotOutput("plot1", height = 250)),
Stephanie's avatar
Stephanie committed
80
                box(title="Timeline",
81
                    status = "warning",
Stephanie's avatar
Stephanie committed
82 83 84
                    solidHeader = TRUE,
                    collapsible = TRUE,plotOutput("plot3", height = 250)),
                box(title="Linechart",
85
                    status = "warning",
Stephanie's avatar
Stephanie committed
86 87
                    solidHeader = TRUE,
                    collapsible = TRUE,plotOutput("plot4", height = 250))
88
            
Stephanie's avatar
Stephanie committed
89 90 91 92 93 94 95 96 97 98
              )
      ),
      
      # Help tab content
      tabItem(tabName = "help",
              h2("I am here to Help.")
      )
    
      
    ))
99
)