forked from oybcst/shiny-cgem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
141 lines (123 loc) · 6.19 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
library(shinydashboard)
library(leaflet)
library(RColorBrewer)
library(viridis)
dashboardPage(
dashboardHeader(
title = "CGEM-SCHISM Box Model"
),
#----Sidebar
dashboardSidebar(
sidebarMenu(
menuItem("CGEM variables",tabName = "cgem"),
menuItem("Phytoplankton", tabName = "phyto"),
menuItem("Stoichiometry",tabName = "stoich"),
menuItem("Hydro",tabName = "hydro"),
menuItem("Rates",tabName = "rates")
)
),
#----end Sidebar
#--Dashboard
dashboardBody(
#Makes the map and plot take 80% or 50% vertical height of browser window
#tags$style(type = "text/css", "#map {height: calc(90vh) !important;}"),
#tags$style(type = "text/css", "#map {timeplot: calc(50vh) !important;}"),
#--Start all TabItem(s)
tabItems(
#--First tabItem is the map and plot
tabItem(tabName="phyto",
fluidRow(
#1 columns
column(width=12,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("A")))
),
fluidRow(
#2 columns
h3("Light limitation factors, Growth and respiration"),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("lightlims"))),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("growresp")))
),
fluidRow(
#1 columns
h3("Irradiance (PAR) at depth"),
column(width=12,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("PAR")))
)
),
tabItem(tabName="cgem",
fluidRow(
#3 columns
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("A1"))),
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("Qn1"))),
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("Qp1"))),
),
fluidRow(
#2 columns
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("Z1"))),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("Z2")))
),
fluidRow(
#4 columns
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("NO3"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("NH4"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("PO4"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("Si")))
),
fluidRow(
#3 columns
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("O2"))),
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("DIC"))),
column(width=4,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("ALK")))
)
),
tabItem(tabName="stoich",
fluidRow(
#2 columns
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("OM1A"))),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("OM2A")))
),
fluidRow(
#4 columns
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sx1A"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sy1A"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sx2A"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sy2A")))
),
fluidRow(
#2 columns
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("OM1Z"))),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("OM2Z")))
),
fluidRow(
#4 columns
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sx1Z"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sy1Z"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sx2Z"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("sy2Z")))
)
), #End stoich tab
tabItem(tabName="hydro",
fluidRow(
#1 columns
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("S"))),
column(width=6,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("T")))
)
), #End hydro tab
tabItem(tabName="rates",
fluidRow(
#3 columns
h3("Rates: Total(black), A(red), Z(blue), R(green), BC(yellow)"),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RO2"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RNO3"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RNH4"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RN2")))
),
fluidRow(
#4 columns
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RPO4"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RDIC"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RSi"))),
column(width=3,box(width=NULL,solidHeader=TRUE,status="primary",plotOutput("RALK")))
)
)
) #--End tab items
)#-- End dashboard Body
)#-- End dashboard Page