-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
138 lines (115 loc) · 5.17 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
### Salmonella Shiny App
#
# This is the user-interface definition of a Shiny web application.
#
###
library(shiny)
library(plotly)
library(ISOweek)
# library(lubridate)
# Define UI for application
shinyUI(
fluidPage(
# Application title
# titlePanel("Salmonella Shiny App"),
# Sidebar with a input controls
sidebarLayout(
sidebarPanel(width = 2,
fileInput('file', 'Choose CSV file:', accept = c('text/csv', 'text/comma-separated-values,text/plain', '.csv')),
# fileInput('file1', 'Choose data file:', accept = c('text/csv', 'text/comma-separated-values,text/plain', '.csv', ".xls")),
radioButtons("datesType", "Type of dates:", c("Date of reception", "Date of isolation")),
selectInput("year", "Year:", c()),
tags$div(
style = "margin-left:30px;",
selectInput("week", "ISO week:", c())
),
selectInput("region", "Region:", c()),
tags$div(
style = "margin-left:30px;",
selectInput("department", "Department:", c())
),
selectInput("serotype", "Serotype:", c()),
tags$div(
style = "margin-left:30px;",
selectInput("subtype", "Subtype:", c())
),
selectInput("ageGroup", "Age group:", c()),
# actionButton("button", "Detect outbreaks", width = 130),
checkboxInput("detectReg", "Regional alerts", FALSE),
checkboxInput("detectSer", "Serotype alerts", FALSE)
),
mainPanel(
tableOutput("contents"),
tabsetPanel(
tabPanel("Distributions",
column(6,
tags$div(
style = "margin-top:30px;margin-bottom:20px;",
plotlyOutput("temporalPlotly", height = 300)
),
tags$div(
style = "margin-top:30px;margin-bottom:20px;",
plotlyOutput("serotypePlotly", height = 300)
)
),
column(6,
tags$div(
style = "margin-top:30px;margin-bottom:20px;",
plotlyOutput("regionalPlotly", height = 300)
),
tags$div(
style = "margin-top:30px;margin-bottom:20px;",
plotlyOutput("dynamicPlotly", height = 300)
)
),
verbatimTextOutput("info"),
column(6, div(dataTableOutput("table"), style = "font-size:80%"))
),
tabPanel("Projections",
tags$div(
style = "margin-top:20px;margin-bottom:20px;",
plotlyOutput("projectionPlot")
),
sliderInput("highSeasonRange", "High season (weeks):",
min = 0, max = 52, value = c(29, 40)),
sliderInput("coeffForHighSeason",
"Percent of samples sequenced in high season:",
min = 0,
max = 1,
value = 0.5),
sliderInput("coeffDefault",
"Percent of samples sequenced by default:",
min = 0,
max = 1,
value = 0.7,
step = 0.01)
),
tabPanel("Case clusters",
fluidRow(
splitLayout(cellWidths = c("30%", "70%"),
tags$div(
style = "margin-top:20px;margin-bottom:20px;",
plotlyOutput("clusterHist")
),
tags$div(
style = "margin-top:20px;margin-bottom:20px;",
plotlyOutput("clusterPlotly")
)
)),
# plotOutput("clusterPlot"),
sliderInput("window", "Window (days):",
min = 0, max = 50, value = 30),
sliderInput("threshold", "Threshold (cases):",
min = 0, max = 30, value = 3)
),
tabPanel("Monthly cases",
tags$div(
style = "margin-top:20px;margin-bottom:20px;",
plotlyOutput("monthlyHist")
)
)
)
)
)
)
)