Skip to content

Commit e60f211

Browse files
author
Ezra Brooks
committed
Create a definition file for each UI tab
Reduce some boilerplate across tabs
1 parent e3c38a9 commit e60f211

9 files changed

Lines changed: 490 additions & 407 deletions

File tree

‎R/UI.R‎

Lines changed: 30 additions & 407 deletions
Large diffs are not rendered by default.

‎R/ui/acknowledgements.R‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
tabPanel(
2+
"Acknowledgements",
3+
tags$h4("Support:"),
4+
tags$a(href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=1734237","NSF SES-1734237"),
5+
tags$p("Antecedents of Complexity in Healthcare Routines"),
6+
tags$h4("Code Gurus:"),
7+
tags$p("Yu Lucy Han, Ezra Brooks, Patrick Bills, Danielle Barnes, Morgan Patterson, Douglas Krum"),
8+
tags$h4("Collaborators:"),
9+
tags$p("Jan Recker, George Wyner, Martha Feldman, Thorvald Haerem, Waldemar Kremser, Julie Ryan Wolf, Ken Frank, Alice Pentland, Inkyu Kim, Sudhanshu Srivastava"),
10+
tags$h4("Related Publications:"),
11+
tags$a(href="http://routines.broad.msu.edu/resources/","http://routines.broad.msu.edu/resources/" ),
12+
tags$h4("ThreadNet 2 (MatLab version):"),
13+
tags$a(href="http://routines.broad.msu.edu/ThreadNet/","http://routines.broad.msu.edu/ThreadNet/" )
14+
)

‎R/ui/choosePOV.R‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
tabPanel(
2+
"Choose POV",
3+
helpText('Select columns from your data to define your point of view. You MUST click on either Preview Threads or Preview Data before proceeding.'),
4+
tags$hr(),
5+
tabsetPanel(
6+
type = "tabs",
7+
tabPanel(
8+
"Define Threads",
9+
tags$h4("Threads are defined by contextual features that STAY THE SAME during a thread. At least ONE is required."),
10+
uiOutput("POV_Tab_Controls_2"),
11+
plotlyOutput("ContextFlowers_2")
12+
),
13+
tabPanel(
14+
"Define Events",
15+
tags$h4("Events are marked by contextual features that CHANGE within the threads. At least ONE is required."),
16+
uiOutput("POV_Tab_Controls_3"),
17+
plotlyOutput("ContextFlowers_3")
18+
),
19+
tabPanel(
20+
"Preview Threads",
21+
tags$h4("Threads based on selected POV"),
22+
verbatimTextOutput("Preview_Thread_Output_1" ),
23+
# ** add conditional panels here to choose output **
24+
plotlyOutput("previewThreadMap_1")
25+
),
26+
tabPanel(
27+
"Preview Data",
28+
tags$h4("This table shows the data threaded from your chosen POV"),
29+
DT::dataTableOutput("Thread_Tab_Output_1")
30+
)
31+
)
32+
)
33+

‎R/ui/comparisons.R‎

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
tabPanel(
2+
"Comparisons",
3+
tabsetPanel(
4+
type = "tabs",
5+
tabPanel(
6+
"Compare Mappings (synchronic)",
7+
fluidRow(
8+
column(6,
9+
fluidRow(
10+
column(3, uiOutput("Comparison_Tab_Controls_A1")),
11+
column(3, uiOutput("Comparison_Tab_Controls_A2"))
12+
),
13+
selectizeInput(
14+
'comparePanelSelect_A',
15+
'Choose visualization:',
16+
visualizations # references list defined in UI.R
17+
),
18+
conditionalPanel(condition = "input.comparePanelSelect_A == 'Threads (event time)'", plotlyOutput("Comp_A_1") ),
19+
conditionalPanel(condition = "input.comparePanelSelect_A == 'Threads (actual time)'", plotlyOutput("Comp_A_2") ),
20+
conditionalPanel(condition = "input.comparePanelSelect_A == 'Threads (relative time)'", plotlyOutput("Comp_A_3") ),
21+
conditionalPanel(
22+
condition = "input.comparePanelSelect_A == 'Event network (circle)'",
23+
uiOutput("Comp_A_4_controls"),
24+
visNetworkOutput("Comp_A_4")
25+
),
26+
conditionalPanel(
27+
condition = "input.comparePanelSelect_A == 'Event network (force)'",
28+
uiOutput("Comp_A_5_controls"),
29+
forceNetworkOutput("Comp_A_5"
30+
),
31+
conditionalPanel(
32+
condition = "input.comparePanelSelect_A == 'Other networks'",
33+
uiOutput("Comp_A_6_controls"),
34+
visNetworkOutput("Comp_A_6")
35+
),
36+
conditionalPanel(
37+
condition = "input.comparePanelSelect_A == 'Role Maps'",
38+
uiOutput("Comp_A_7_controls"),
39+
plotlyOutput("Comp_A_7")
40+
),
41+
conditionalPanel(
42+
condition = "input.comparePanelSelect_A == 'Thread Trajectories'",
43+
plotlyOutput("Comp_A_8")
44+
)
45+
),
46+
column(6,
47+
fluidRow(
48+
column(3, uiOutput("Comparison_Tab_Controls_B1")),
49+
column(3, uiOutput("Comparison_Tab_Controls_B2"))) ,
50+
selectizeInput(
51+
'comparePanelSelect_B',
52+
'Choose visualization:',
53+
visualizations # references list defined in UI.R
54+
),
55+
conditionalPanel(
56+
condition = "input.comparePanelSelect_B == 'Threads (event time)'",
57+
plotlyOutput("Comp_B_1")
58+
),
59+
conditionalPanel(
60+
condition = "input.comparePanelSelect_B == 'Threads (actual time)'",
61+
plotlyOutput("Comp_B_2")
62+
),
63+
conditionalPanel(
64+
condition = "input.comparePanelSelect_B == 'Threads (relative time)'",
65+
plotlyOutput("Comp_B_3")
66+
),
67+
conditionalPanel(
68+
condition = "input.comparePanelSelect_B == 'Event network (circle)'",
69+
uiOutput("Comp_B_4_controls"),
70+
visNetworkOutput("Comp_B_4")
71+
),
72+
conditionalPanel(
73+
condition = "input.comparePanelSelect_B == 'Event network (force)'",
74+
uiOutput("Comp_B_5_controls"),
75+
forceNetworkOutput("Comp_B_5")
76+
),
77+
conditionalPanel(
78+
condition = "input.comparePanelSelect_B == 'Other networks'",
79+
uiOutput("Comp_B_6_controls"),
80+
visNetworkOutput("Comp_B_6")
81+
),
82+
conditionalPanel(
83+
condition = "input.comparePanelSelect_B == 'Role Maps'",
84+
uiOutput("Comp_B_7_controls"),
85+
plotlyOutput("Comp_B_7")
86+
),
87+
conditionalPanel(
88+
condition = "input.comparePanelSelect_B == 'Thread Trajectories'",
89+
plotlyOutput("Comp_B_8")
90+
)
91+
)
92+
)
93+
),
94+
95+
tabPanel(
96+
"Compare time periods (diachronic)",
97+
fluidRow(
98+
column(3,uiOutput("Diachronic_Comparison_Tab_Controls_1") ),
99+
column(3,uiOutput("Diachronic_Comparison_Tab_Controls_4"),uiOutput("Diachronic_Comparison_Tab_Controls_5") ),
100+
column(3,uiOutput("Diachronic_Comparison_Tab_Controls_3") )
101+
),
102+
plotlyOutput("DiachronicComparisonPlots")
103+
)
104+
)
105+
)
106+
)

‎R/ui/movingWindow.R‎

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
tabPanel(
2+
"Moving Window",
3+
fluidRow(
4+
column(3,
5+
uiOutput("Moving_Window_Tab_Controls_1"),
6+
selectizeInput(
7+
'Moving_Window_Viz',
8+
'Choose visualization:',
9+
visualizations # references list defined in UI.R
10+
),
11+
radioButtons(
12+
"Moving_Window_Type",
13+
"Moving window type:",
14+
choices = c('Single Window','Dual Window'),
15+
selected = c('Single Window')
16+
)
17+
),
18+
column(3,
19+
uiOutput("Moving_Window_Tab_Controls_3"),
20+
uiOutput("Moving_Window_Tab_Controls_3a"),
21+
uiOutput("Moving_Window_Tab_Controls_2")
22+
),
23+
column(3,
24+
# add controls that apply to both subsets here
25+
conditionalPanel(
26+
condition = "input.Moving_Window_Viz == 'Event network (circle)'",
27+
uiOutput("Moving_4_controls")
28+
),
29+
conditionalPanel(
30+
condition = "input.Moving_Window_Viz == 'Event network (force)'",
31+
uiOutput("Moving_5_controls")
32+
),
33+
conditionalPanel(
34+
condition = "input.Moving_Window_Viz == 'Other networks'",
35+
uiOutput("Moving_6_controls")
36+
),
37+
conditionalPanel(
38+
condition = "input.Moving_Window_Viz == 'Role Maps'",
39+
uiOutput("Moving_7_controls")
40+
)
41+
)
42+
),
43+
44+
conditionalPanel(
45+
condition = "input.Moving_Window_Type == 'Single Window'",
46+
plotlyOutput("single_moving_window_timeline")
47+
),
48+
conditionalPanel(
49+
condition = "input.Moving_Window_Type == 'Dual Window'",
50+
plotlyOutput("dual_moving_window_timeline")
51+
),
52+
fluidRow(
53+
column(6,
54+
"SubsetA",
55+
uiOutput("Moving_Window_Tab_Controls_4_A"),
56+
conditionalPanel(
57+
condition = "input.Moving_Window_Viz == 'Threads (event time)'",
58+
plotlyOutput("Moving_A_1")
59+
),
60+
conditionalPanel(
61+
condition = "input.Moving_Window_Viz == 'Threads (actual time)'",
62+
plotlyOutput("Moving_A_2")
63+
),
64+
conditionalPanel(
65+
condition = "input.Moving_Window_Viz == 'Threads (relative time)'",
66+
plotlyOutput("Moving_A_3")
67+
),
68+
conditionalPanel(
69+
condition = "input.Moving_Window_Viz == 'Event network (circle)'",
70+
visNetworkOutput("Moving_A_4")
71+
),
72+
conditionalPanel(
73+
condition = "input.Moving_Window_Viz == 'Event network (force)'",
74+
forceNetworkOutput("Moving_A_5")
75+
),
76+
conditionalPanel(
77+
condition = "input.Moving_Window_Viz == 'Other networks'",
78+
visNetworkOutput("Moving_A_6")
79+
),
80+
conditionalPanel(
81+
condition = "input.Moving_Window_Viz == 'Role Maps'",
82+
plotlyOutput("Moving_A_7")
83+
),
84+
conditionalPanel(
85+
condition = "input.Moving_Window_Viz == 'Thread Trajectories'",
86+
plotlyOutput("Moving_A_8")
87+
)
88+
89+
),
90+
column(6,
91+
"SubsetB",
92+
uiOutput("Moving_Window_Tab_Controls_4_B"),
93+
conditionalPanel(
94+
condition = "input.Moving_Window_Viz == 'Threads (event time)'",
95+
plotlyOutput("Moving_B_1")
96+
),
97+
conditionalPanel(
98+
condition = "input.Moving_Window_Viz == 'Threads (actual time)'",
99+
plotlyOutput("Moving_B_2")
100+
),
101+
conditionalPanel(
102+
condition = "input.Moving_Window_Viz == 'Threads (relative time)'",
103+
plotlyOutput("Moving_B_3")
104+
),
105+
conditionalPanel(
106+
condition = "input.Moving_Window_Viz == 'Event network (circle)'",
107+
visNetworkOutput("Moving_B_4")
108+
),
109+
conditionalPanel(
110+
condition = "input.Moving_Window_Viz == 'Event network (force)'",
111+
forceNetworkOutput("Moving_B_5")
112+
),
113+
conditionalPanel(
114+
condition = "input.Moving_Window_Viz == 'Other networks'",
115+
visNetworkOutput("Moving_B_6")
116+
),
117+
conditionalPanel(
118+
condition = "input.Moving_Window_Viz == 'Role Maps'",
119+
plotlyOutput("Moving_B_7")
120+
),
121+
conditionalPanel(
122+
condition = "input.Moving_Window_Viz == 'Thread Trajectories'",
123+
plotlyOutput("Moving_B_8")
124+
)
125+
)
126+
)
127+
)

‎R/ui/parameterSettings.R‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tabPanel(
2+
"Parameter Settings",
3+
tableOutput("currentParameterSettings")
4+
)

‎R/ui/readData.R‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tabPanel(
2+
"Read Data",
3+
helpText('Select a file that contains your data.'),
4+
tags$hr(),
5+
uiOutput("Data_Tab_Controls_1"),
6+
uiOutput("Data_Tab_Controls_2"),
7+
DT::dataTableOutput("Data_Tab_Output_2")
8+
)

0 commit comments

Comments
 (0)