This repository was archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathui.R
More file actions
236 lines (182 loc) · 5.73 KB
/
Copy pathui.R
File metadata and controls
236 lines (182 loc) · 5.73 KB
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
#### loading libraries ####
library(leaflet)
library(ShinyDash)
library(shinysky)
library(DT)
library(shinycssloaders)
#### definition of frontend output/input ####
shinyUI(
navbarPage(
"neolithicRC - Search tool for radiocarbon dates",
id = "nav",
tabPanel("Update Local Database ⛁",
HTML('
<a href = "https://github.com/nevrome/neolithicR">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index:1000"
src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png">
</a>
'),
shiny::includeMarkdown("README.md"),
hr(),
htmlOutput('startmessage'),
br(),
shinyjs::useShinyjs(),
uiOutput("updateriddle"),
uiOutput("updatebutton"),
br(), br(),
textOutput("c14bazAArout")
),
tabPanel("Search and Filter ⌕",
HTML('
<a href = "https://github.com/nevrome/neolithicR">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index:1000"
src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png">
</a>
'),
fluidRow(
singleton(
tags$head(
tags$script(src = "message-handler.js"),
tags$style(
HTML(".shiny-notification {
height: 50px;
width: 400px;
position: fixed;
top: calc(50% - 50px);;
left: calc(50% - 200px);;
font-size: 18px;
text-align: center;
}"
)
)
)
),
column(2,
uiOutput("sourcedb_selection")
),
column(2,
uiOutput("country_selection"),
uiOutput("material_selection")
),
column(2,
textInput(
"siteselect",
"Site search"
),
textInput(
"culselect",
"Period/Culture search"
)
),
column(2,
textInput(
"labselect",
"Lab Number search"
)
),
column(4,
textOutput('numbertext'),
htmlOutput('originamounttext'),
textOutput('duplitext'),
textOutput('mappingwarning')
)
),
uiOutput("age_slider"),
#datatable output
withSpinner(DT::dataTableOutput("radiodat")),
#selection buttons and download
downloadButton(
'downloadseldates',
'Download current selection as tab separated .csv file'
)
),
tabPanel("Interactive map ⚆",
div(
class="outer",
# Include custom CSS
tags$head(
includeCSS("styles.css")
),
#output of map
leafletOutput(
"radiocarbon",
width = "100%",
height = "100%"
),
bootstrapPage(
# Panel 1 (Plots)
absolutePanel(
id = "controls",
class = "panel panel-default",
fixed = TRUE,
draggable = TRUE,
top = 65,
left = "auto",
right = 10,
bottom = "auto",
width = 600,
height = "auto",
HTML('
<button
data-toggle = "collapse"
data-target = "#dataplots"
class = "closeopen">
▼ See date density and calibration plots ▼
</button>
'),
div(
id = 'dataplots',
class = "collapse", # start collapsed
#class="collapse in", # start not collapsed
br(),
#period barplot output
withSpinner(plotOutput(
"calplot",
height = "600px",
width = "100%"
))
)
),
# Panel 2 (Basemap)
absolutePanel(
id = "controls",
class = "panel panel-default",
fixed = TRUE,
draggable = TRUE,
top = 65,
right = "auto",
left = 50,
bottom = "auto",
width = 350,
height = "auto",
htmlOutput('link'),
HTML('
<button
data-toggle = "collapse"
data-target = "#basemapset"
class = "closeopen">
▼ Select basemap ▼
</button>
'),
div(
id = 'basemapset',
class = "collapse", # start collapsed
selectizeInput(
'basemapselect',
label = NULL,
choices = NULL
),
helpText(
"You can change the appearance of this map by replacing the tile source."
)
)
)
)
)
)
)
)