-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
141 lines (122 loc) · 5.01 KB
/
ui.R
File metadata and controls
141 lines (122 loc) · 5.01 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
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
library(shiny)
library(shinydashboard)
dashboardPage(
dashboardHeader(title = "Data Portal",
dropdownMenu(type = "messages",
messageItem(
from = "Sales Dept",
message = "Sales forecating for you"
),
messageItem(
from = "New User",
message = "Welcome to dashboard",
icon = icon("question"),
time = "13.45"
)
),
dropdownMenu(type = "notification",
notificationItem(
text = "5 items delivered",
icon = icon("users")
),
notificationItem(
text = "12 items delivered",
icon("truck"),
status = "success"
),
notificationItem(
text = "Fuction overload 86%",
icon("warning"),
status = "warning"
)
),
dropdownMenu(type = "tasks", badgeStatus = "success",
taskItem(
value = 85, color = "green", "Sales done by Merchant"
),
taskItem(
value = 65, color = "red", "Data Analysis"
)
)
),
dashboardSidebar(
h5("Powered by"),
tags$img(src="download.png",align = "center", height=70, width = 230),
sliderInput("rateThreshold", "Warn when rate exceeds",
min = 0, max = 50, value = 3, step = 0.1
),
sidebarMenu(
fileInput("file1", "Choose CSV File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")),
radioButtons("disp", "Display",
choices = c(Head = "head",
All = "all"),
selected = "head"),
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Charts", tabName = "barchart", icon = icon("bar-chart")),
menuItem("Data", icon = icon("database"),
menuSubItem("Raw data", tabName = "rawdata", icon = icon("archive")),
menuSubItem("Data summary", tabName = "datasummary", icon = icon("book"))
)
)
),
dashboardBody(
tabItems(
tabItem("dashboard",
fluidRow(
valueBoxOutput("rate"),
valueBoxOutput("count"),
valueBoxOutput("users")
),
fluidRow(
box(
status = "info", solidHeader = TRUE,
title = "Merchant Name",collapsible = TRUE,
plotOutput("plot")
),
fluidRow(
box(
status = "warning", solidHeader = TRUE,
title = "Product Name", collapsible = TRUE,
plotOutput("plot1")
)
)
)
),
tabItem("rawdata",
numericInput("maxrows", "Rows to show", 25),
verbatimTextOutput("rawtable"),
downloadButton("downloadCsv", "Download as CSV")
),
tabItem("datasummary",
h4("Summary"),
verbatimTextOutput("summary"),
h3("Data"),
tableOutput("contents")),
tabItem("barchart",
fluidRow(
box(status = "primary",
solidHeader = TRUE,
title = "Transactions per States", collapsible = TRUE,
plotlyOutput("chart1")),
box(status = "warning",
solidHeader = TRUE,
title = "Transaction and Sale Amount by States", collapsible = TRUE,
plotlyOutput("plot4"))
),
fluidRow(
box(status = "primary", solidHeader = TRUE,
title = "Saleamount per merchant", collapsible = TRUE,
plotlyOutput("plot5")),
box(status = "warning", solidHeader = TRUE,
title = "Transactions per merchant", collapsible = TRUE,
plotlyOutput("pie")
)
)
)
)
)
)