-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
51 lines (34 loc) · 1.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
# ------------------------------------------------------------------------------
# Shiny: server logic of the Shiny web application
# ------------------------------------------------------------------------------
# -- Define server logic
shinyServer(
function(input, output, session){
# --------------------------------------------------------------------------
# Local run & debug
# --------------------------------------------------------------------------
# -- detect local run
is_local <- Sys.getenv('SHINY_PORT') == ""
cat(">> local run =", is_local, "\n")
# -- set DEBUG
DEBUG <<- is_local
# --------------------------------------------------------------------------
# Communication objects
# --------------------------------------------------------------------------
# -- declare r communication object
r <- reactiveValues()
# -- loaded dataset (exposed to check if filters can be displayed)
r$dataset <- reactiveVal(NULL)
# --------------------------------------------------------------------------
# Launch module servers
# --------------------------------------------------------------------------
# -- the map
map_Server(id = "map", r = r, path = path)
# -- polygon
polygon_Server(id = "polygon", r = r, path = path)
# -- election servers
presidentielles_Server(id = "presidentielles", r = r, path = path)
legislatives_Server(id = "legislatives", r = r, path = path)
europeennes_Server(id = "europeennes", r = r, path = path)
}
)