-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
166 lines (160 loc) · 5.04 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
require(shinythemes)
require(dplyr)
# Loading data from an RData doesn't work, load manually or specify based on read.csv
# Establish page variables
intro <- "Placeholder for introductory language"
namList <- names(MESBdata)
minDate <- min(MESBdata$`Date Collected`[!is.na(MESBdata$`Date Collected`)])
maxDate <- max(MESBdata$`Date Collected`[!is.na(MESBdata$`Date Collected`)])
# dateRange <- as.Date(as.vector(dateRange$'Date Collected'), format="%m/%d/%Y")
shinyUI(
navbarPage("Marine STAR",theme = shinytheme("yeti"),
tabPanel("Home",
fluidRow(
column(12,
titlePanel("Marine Environmental Specimen Bank Explorer v0.1"),
hr(),
intro
)
)
),
#navbarMenu("Navigation",
tabPanel("Sample Inventory",
# Heading row with selections for Project and Species
fluidRow(column(12,h3("Explore samples housed at the NIST Marine ESB"))),
fluidRow(column(12,h4("1. Select the broadest categories of interest"))),
fluidRow(
column(4,
selectInput('ProjectChoice',
label=h6('Project'),
choices=levels(MESBdata$'Project ID'),
multiple=TRUE,
selectize=TRUE
)
),
column(4,
selectInput('SpeciesChoice',
label=h6('Species'),
choices=levels(MESBdata$Species),
multiple=TRUE,
selectize=TRUE
)
),
column(4,
dateRangeInput('DateRange',
label=h6('Collected from'),
start=minDate,
end=maxDate,
min=minDate,
max=maxDate,
format="d M yyyy",
startview="decade"
)
#),
#column(1,
# checkboxInput('StrictDates',
# label='Strict Dates',
# value=TRUE
# )
)
),
hr(),
fluidRow(column(12,h4("2. Refine your search"))),
fluidRow(
column(12,
tabsetPanel(id='DataTabs',
tabPanel(id='SummaryCounts', 'Summary Counts',
selectInput('SummariseBy',
label=h6('Count Aliquots by:'),
choices=namList,
selected=c('Species','Tissue Type'),
multiple=TRUE,
selectize=TRUE
),
DT::dataTableOutput('AliquotCount'),
hr()#,
#fluidRow(
# column(4, offset=4,
# actionButton('GetAliquotData','Restrict aliquot data to selected rows')
# )
#)
),
tabPanel(id='AllData', 'All Data',
fluidRow(
column(12,
selectInput('ShowVars',
label=h6('Show data for:'),
choices=namList,
multiple=TRUE,
selectize=TRUE,
selected=c('Project ID',
'Species',
'Globally Unique Sample ID',
'Age Class',
'Tissue Type',
'Globally Unique Aliquot ID')
)
)
),
fluidRow(
column(12,
DT::dataTableOutput('AllData'),
hr()
)
),
fluidRow(
column(4, offset=8,
'Save this aliquot set as:',
downloadButton('saveAsCSV','CSV'),
downloadButton('saveAsXLS','XLS')
)
)
),
tabPanel('Freezers',
plotOutput('Freezers')
),
tabPanel('Testing',
textOutput('log')
)
)
)
)
),
tabPanel(id='chemistry', 'Environmental Chemistry (experimental)',
fluidRow(
column(12,
selectInput('ShowChemGroup',
label=h2('Select Chemical Class(es) of Interest'),
choices=levels(chem$category),
multiple=TRUE,
selectize=TRUE,
selected=levels(chem$category)
)
)
),
hr(),
fluidRow(
column(12,
plotOutput('Chemistry',height="800px")
)
),
hr(),
fluidRow(
column(12,
DT::dataTableOutput('AllChemData')
)
)
),
tabPanel(ie='request','Request an Aliquot Set (unavailable)'
)
#) #<- navBarMenu end
)
)