-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.R
38 lines (30 loc) · 1.37 KB
/
server.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
# Additional scripts and data ---------------------------------------------
source("scripts/1_globe.R",local = T)
# the main server function ------------------------------------------------
shinyServer(
function(input, output,session) {
# Dynamic variables -------------------------------------------------------
# data_val <- reactiveValues(
# # stand.df = NULL
# plot.info.df = NULL,
# # tree.df = NULL,
# # tree.shiny = NULL,
# # regeneration.df = NULL,
# # deadwood.df = NULL,
# # gplot = NULL
# )
# General data overview ---------------------------------------------------
output$gMap <- renderLeaflet(plotMap)
output$gInf <- renderPlot(plotInfo)
output$plotTable <- DT::renderDataTable(
plot.df %>% select(plot_id = plot_name, inventory = date, country, location, stand, standshort, foresttype, plotsize, dbh_min, altitude_m, slope, aspect) %>% toDT()
)
# stand level tab ----------------------------------------------------------
source("scripts/2_stand.R",local = T)
# Plot level tab ----------------------------------------------------------
source("scripts/3_plot.R",local = T)
# Session end -------------------------------------------------------------
session$onSessionEnded(function(){poolClose(KEL)})
session$onSessionEnded(stopApp)
}
)