forked from chendaniely/construct_wiki_mock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
62 lines (61 loc) · 3.49 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
library(shiny)
dashboardPage(
dashboardHeader(disable = TRUE),
dashboardSidebar(disable = TRUE),
dashboardBody(
navbarPage(
"Construct Viewer",
tabPanel("Network",
fluidPage(
fluidRow(
h1("Construct Network Visualization"),
column(6,
p(paste("Here you will find all the constructs and their relations to one another.",
sep = ' ')),
p(paste("Hovering over a node will display the definition of the construct",
sep = ' ')),
p("Multiple edges refer to multiple definitions for the construct"),
p("Zoom in to see the labels.")),
column(6,
p(paste(
"You can click the edit button to modify and explore the network directly (without)",
"changing the underlying data structure.",
"For example, you can add an edge to/from 'Education' to 'Wisdom and Knowledge' and see",
"how the networks change.",
sep = ' '
)),
p("Double-cliking nodes will collapse all connections.")))
),
fluidRow(
column(10,
visNetworkOutput("vis_network", width = "100%", height = "800px"),
style = 'border:1px solid;'),
column(2,
radioButtons("radio_data", label = 'Dataset',
choices = list("Adjusted" = .GlobalEnv$ADJUSTED_DATA,
"Original" = .GlobalEnv$ORIGINAL_DATA
),
selected = .GlobalEnv$ADJUSTED_DATA
)
)
)
),
tabPanel("Definitions",
h1("Construct Definitions"),
p(paste("Here you can select a specific construct and see the definition and more details.",
sep = ' ')),
uiOutput('construction_selection'),
DT::dataTableOutput('construct_definition_dt')
),
tabPanel("Data",
DT::dataTableOutput('construct_dt')
),
navbarMenu("More",
tabPanel("Raw Data View",
h1("Raw Data View"),
p("Here you can see the exact data from the underlying spreadsheet used to populate the construct viewer."),
HTML('<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vR2imOgIzmv8ayb7rDrvVySZ0vFDGNULSGNgT5ObdXOyEEnrok-JlW4MP0jWNSJl1aP_UuKgVDsFZer/pubhtml?gid=432933410&single=true&widget=true&headers=false" style="position: absolute; height: 80%; width: 97%; border: none"></iframe>')),
tabPanel("Empty"))
)
)
)