-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
129 lines (118 loc) · 5.8 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
dashboardPage(
dashboardHeader(title = "IGFS"),
dashboardSidebar( sidebarMenu(id="menu1",
menuItem("Main Page", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Species specific pages", tabName = "sp", icon = icon("th"))
),
conditionalPanel(
condition = "input.menu1 == 'sp'",
selectInput("sp1", "Select a species:",
choices = levels(sp_names$species),selectize = TRUE,selected = "Haddock"))),
dashboardBody(
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"
),
tabItems(
tabItem("dashboard",
fluidPage(
#includeCSS(path = "adminLTE.css"),
#includeScript(path = "app.js"),
tags$head(includeScript("google-analytics.js")),
fluidRow(valueBoxOutput("box1"),
valueBoxOutput("box2"),
valueBoxOutput("box3")
),
fluidRow(
box(h4("Interactive Map"),style = "margin-top:-1.5em",
column(8,
leafletOutput("map", height=650)),
column(4,
id="controls", fixed=FALSE, draggable = TRUE,
fluidRow(column(11,selectInput("catch_measure",label=NULL, choices = c("Biomass (Kg)","Number of fish (per hour)")),
sliderInput("slideryear", "Year:", min = 2003, max = max(sp_data_gp$Year), value = max(sp_data_gp$Year),
step = 1, sep = "", animate = TRUE))),
fluidRow(column(6,gaugeOutput("gauge1"),style = "margin-top:-0em"),
column(6,gaugeOutput("gauge2"),style = "margin-top:-0em")),
fluidRow(column(12,
plotlyOutput("sp_piechart")
%>% withSpinner(color="#0dc5c1"),
style = "margin-top:-10em")
),
fluidRow(column(6,offset=4,downloadButton("downloadstation_data", "Download Station data")))
),
solidHeader =FALSE, collapsible = T,width= "auto", background = "navy")
),
fluidRow(
box(title = "Indices",width = 4, background = "green",
uiOutput("sp_indices"),
uiOutput("stock_indices"),
downloadButton("indiDownload", "Download")
),
box(title = "Further information", width = 4, background = "green",
textOutput("moreInfo"),
br(),
actionButton("modal1", "Introduction"),
actionButton("modal2", "Survey Objectives"),
br(),
br(),
actionButton("modal3", "Survey Design"),
actionButton("modal4", "Methodology"),
br(),
br()),
box(title ="Useful links",width = 4, status = "success",
a(href=paste0("https://shiny.marine.ie/speciesdash/"),
"The Species Dashboard",target="_blank"),
p(),
a(href=paste0("https://shiny.marine.ie/stockbook/"),
"The Digital Stockbook",target="_blank"),
p(),
a(href=paste0("https://www.marine.ie"),
"The Marine Institute webpage",target="_blank"),
br(),
br(),
br(),
br())
)
)),
tabItem("sp", uiOutput("Sp_name"), fluidRow(
tabBox(id="pages",width=12,height = "650px",
tabPanel("Mapping",value = "map",
box(width=3, status = "primary",uiOutput("yearfilter1")
,downloadButton("downloadData_map", "Download Map data")),
box(title="Map", solidHeader = TRUE,width=9, status = "primary"
,
leafletOutput('mymap', height=600)
)
),
tabPanel("Plots",value="plots",
box(width=3,status = "primary",uiOutput("yearfilter"),
uiOutput("paramselector"),
# selectInput("parameter", h3("Select Parameter"),
# choices = c("None", "Gear", "Sex", "Division"), selected = "None"),
uiOutput("divfilter"),
uiOutput("Ldownload"),
uiOutput("LWAdownload"),br(),
uiOutput("LPdownload")),
tabBox(id="tabselected",width=9,tabPanel("CPUE", value="cpue",
fluidRow(column(5, plotlyOutput("cpueplotall", width="100%")),
column(7, plotlyOutput("cpueplotparam", width="100%"))),
"* The line is the mean CPUE by Year for stations with positive catches"),
tabPanel("Abundance", value="abundance",
fluidRow(column(5, plotlyOutput("abundanceplotall", width="100%")),
column(7, plotlyOutput("abundanceplotparam", width="100%"))),
"* The line is the mean Abundance by Year"),
tabPanel("Length Frequency", value="lf",uiOutput("lengthfrequi")),
tabPanel("Length/Weight", value="lw", uiOutput("LengthWeightUI")),
tabPanel("Length/Age", value="la",uiOutput("latab")),
tabPanel("Cohort Length/Age", value="co",
uiOutput("cohorttab")))
)
)
))
),hr(),
fluidRow(width =12,style = "margin-top:-4em",
box(width =12,
img(src="Niamh.png", width = "900px", height = "75px", style="display: block; margin-left: auto; margin-right: auto;margin-top:0em")
)
)))