-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
106 lines (98 loc) · 2.86 KB
/
ui.R
File metadata and controls
106 lines (98 loc) · 2.86 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
library(shiny)
library(shinythemes)
navbarPage(
theme = shinytheme("flatly"),
"WHO Life Expectancy Analysis",
tabPanel("Descriptive Statistics",
tabsetPanel(
tabPanel(
"Filter by Country/Year",
sidebarPanel(
selectizeInput(
'country_bar',
h2("Country"),
choices = NULL,
multiple = TRUE
),
selectInput(
'year_bar',
h2('Year'),
choices = c(2000:2015),
selectize = TRUE,
multiple = TRUE
)
),
style = 'overflow: scroll',
tableOutput("CountryTable")
),
tabPanel(
"Summary Statistics by Country, Year, Development",
sidebarPanel(
selectizeInput(
'group_bar',
h3("Choose Variable to Group By:"),
choices = c("Country", "Year", "Development"),
multiple = FALSE
),
selectizeInput(
'statistic_bar',
h3("Choose Statistic"),
choices = c("Mean", "Median", "Standard Deviation"),
multiple = FALSE
)
),
tableOutput("StatsTable")
)
)),
tabPanel(
"Visualization",
sidebarPanel(
selectizeInput(
'x_bar',
h3("Choose x-variable"),
choices = c("Life_Expectancy", "BMI", "Development"),
multiple = FALSE
),
selectizeInput(
'y_bar',
h3("Choose y-variable"),
choices = NULL,
multiple = FALSE
),
checkboxGroupInput('z_bar', h3("Choose optional variable"), choices =
NULL),
checkboxInput('smoothed_option', h6("Smoothed Line"))
),
plotOutput("visualization")
),
tabPanel(
"Statistical Analysis",
sidebarPanel(
selectizeInput(
'predictor_bar',
h3("Choose Predictor Variables for Linear Regression"),
choices = NULL,
multiple = TRUE
),
selectizeInput(
'response_bar',
h3("Choose Response Variable for Linear Regression"),
choices = NULL,
multiple = FALSE
),
textInput("values", h4("Enter Predictor Values (seperated by comma)"))
),
mainPanel(fluidRow(
column(
12,
verbatimTextOutput('lmSummary'),
conditionalPanel(condition = "input.predictor_bar.length == 1",
plotOutput("SimpReg"))
)
), fluidRow(column(
12, withMathJax(h3(htmlOutput('by_hand')))
)),
verbatimTextOutput("predictions")
)
)
)