-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.R
64 lines (48 loc) · 2.84 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
52
53
54
55
56
57
58
59
60
61
62
63
#################################################################################
################################### back-end ####################################
#################################################################################
# Define server functions required to create the output
# Input and output in the function() are LISTS of all the input objects defined in
# the user interface and all the output objects produced by the functions.
# EACH input and output element MUST have a unique ID
shinyServer(
################################## OP level ##########################################
function(input, output, session){
observeEvent(input$msOPp,{
updateSelectInput(session, inputId='fundOPp',
choices=unique(dfP$fund[dfP$ms==input$msOPp]))
observeEvent(input$fundOPp,{
updateSelectInput(session, inputId='titleOPp',
choices=unique(dfP$title[dfP$ms==input$msOPp & dfP$fund==input$fundOPp]))
})
})
source('functions/visualize/op_level/NestedBarPlotPA.R', local = T)
source('functions/visualize/op_level/NestedBarPlotTO.R', local = T)
source('functions/visualize/op_level/TimeSeries.R', local = T)
source('functions/visualize/op_level/NestedBarPlotTS.R', local = T)
source('functions/visualize/op_level/TableData.R', local = T)
################################## MS level ##########################################
observeEvent(input$msMSp,{
updateSelectInput(session, 'fundMSp', choices=unique(dfP$fund[dfP$ms==input$msMSp]))
})
source('functions/visualize/ms_level/NestedBarPlotMS.R', local = T)
source('functions/visualize/ms_level/NestedBarPlotTO.R', local = T)
source('functions/visualize/ms_level/TimeSeries.R', local = T)
################################## EU level ##########################################
source('functions/visualize/eu_level/NestedBarPlotEU.R', local = T)
source('functions/visualize/eu_level/NestedBarPlotTO.R', local = T)
source('functions/visualize/eu_level/NestedBarPlotTOeuro.R', local = T)
################################## Indicator ##########################################
observeEvent(input$fundInd,{
updateSelectInput(session, inputId='ToInd',
choices=unique(dfR$to[dfR$fund==input$fundInd]))
observeEvent(input$ToInd,{
updateSelectInput(session, inputId='codeInd',
choices=unique(dfR$ind_code[dfR$fund==input$fundInd & dfR$to==input$ToInd]))
})
})
source('functions/visualize/ind_level/NestedBarPlotInd.R', local = T)
source('functions/visualize/ind_level/NestedBarPlotIndRate.R', local = T)
source('functions/visualize/ind_level/NestedBarPlotEff.R', local = T)
}
)