-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
161 lines (144 loc) · 8.31 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
if (!require("shiny")) install.packages('shiny')
if (!require("markdown")) install.packages('markdown')
if (!require("data.table")) install.packages('data.table')
if (!require("plotly")) install.packages('plotly')
if (!require("corrplot")) install.packages('corrplot')
if (!require("DT")) install.packages('DT')
if (!require("GGally")) install.packages('GGally')
shinyUI(navbarPage(title = "Ajna - Data Science",
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## HTML Layout Settings
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Use a customized bootstrap theme
theme = 'bootstrap.css',
collapsible = TRUE,
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "About"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tabPanel("About", includeMarkdown("doc/intro.md"), tags$style('.leaflet {height: 600px;}')),
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "Load Data"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tabPanel("Load data", tags$style('.leaflet {height: 600px;}'),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose CSV File',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv')),
tags$hr(),
checkboxInput('header', 'Header', TRUE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
'"'),
tags$hr()#,
#conditionalPanel(
# 'input.dataset === "Dataset"',
# checkboxGroupInput('show_vars', 'Columns in dataset to show:',
# names(tableOutput('names')), selected = names(tableOutput('names'))
# )
#)
),
mainPanel(
tags$hr(),
tabPanel('Dataset', DT::dataTableOutput('contents'))
)
)
),
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "Univariate Analysis"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tabPanel("Univariate Analysis",
sidebarLayout(
sidebarPanel(
selectizeInput('inSelectInput', "Choose an attribute:", choices = names(tableOutput('contents')))
),
mainPanel(
tags$hr(),
h1('Summary'),
tags$hr(),
tableOutput("summary"),
tags$hr(),
h1('Histogram'),
tags$hr(),
sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 10),
plotlyOutput("histPlot"),
tags$hr(),
h1('Box plot'),
tags$hr(),
plotlyOutput("boxPlot")
)
)
),
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "Bivariate Analysis"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tabPanel("Bivariate Analysis",
sidebarLayout(
sidebarPanel(
selectizeInput('inSelectPairInputx', "Choose the explanatory variable (X axis):", choices = names(tableOutput('contents'))),
selectizeInput('inSelectPairInputy', "Choose the response variable (Y axis):", choices = names(tableOutput('contents')))
),
mainPanel(
tags$hr(),
h1('Scatter Plot'),
tags$hr(),
plotlyOutput("scatPlot"),
tags$hr(),
h1('Basic Time Series Plot with Loess Smooth'),
tags$hr(),
plotlyOutput("timeloessPlot"),
tags$hr(),
h1('Line Interpolation Options Plot'),
tags$hr(),
plotlyOutput("linePlot"),
tags$hr(),
h1('Pair Correlation Plot'),
tags$hr(),
plotlyOutput("corrpairPlot"),
tags$hr()
)
)
),
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "Multivariate Analysis"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tabPanel("Multivariate Analysis",
#sidebarLayout(
#sidebarPanel(
# selectizeInput('inSelectMultiInputx', "Choose the X variable:", choices = names(tableOutput('contents'))),
# selectizeInput('inSelectMultiInputy', "Choose the Y variable:", choices = names(tableOutput('contents')))
#),
mainPanel(
#tags$hr(),
#h1('Box plot - Multi'),
#plotlyOutput('boxmultiPlot'),
tags$hr(),
p('Please wait ... it takes some seconds to load the plots.'),
tags$hr(),
h1('Correlation Plot'),
tags$hr(),
plotOutput("corrmultiPlot"),
tags$hr(),
h1('Correlation Plot 2'),
tags$hr(),
plotOutput("corrmultiPlot2"),
tags$hr()
)
#)
),
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Tab "More"
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
navbarMenu("More",
tabPanel("Code", includeMarkdown("doc/code.md")),
tabPanel("Contact", includeMarkdown("doc/contact.md"))
)
))