-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
111 lines (108 loc) · 3.45 KB
/
ui.R
File metadata and controls
111 lines (108 loc) · 3.45 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
# Mengimpor pustaka
library(shinydashboard)
library(rsconnect)
library(dplyr)
library(ggplot2)
library(tidyr)
library(shiny)
library(plotly)
library(shinyWidgets)
library(shiny)
library(plotly)
library(cluster)
library(stats)
# Define UI
ui <- dashboardPage(
dashboardHeader(title = img(src="icon.jpg", height = '53',widht='100',align='right'),titleWidth = 200),
dashboardSidebar(
sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Location", tabName = "locations", icon = icon("map-marker")),
menuItem("Time", tabName = "time", icon = icon("clock")),
menuItem("SalesOverview", tabName = "salesoverview", icon = icon("bar-chart")),
menuItem("Gender", tabName = "gender", icon = icon("venus-mars")),
menuItem("Membership", tabName = "membership", icon = icon("users")),
menuItem("Rating", tabName = "rating", icon = icon("star")),
menuItem("Clustering", tabName = "clustering", icon = icon("chart-bar"))
)
),
dashboardBody(
tabItems(
# Dashboard Tab
tabItem(tabName = "dashboard",
fluidRow(
box(title = "Welcome To Costumer Segmentation",
width = 12)
)
),
# Location Tab
tabItem(tabName = "locations",
fluidRow(
box(plotOutput("location"), width = 12)
)
),
# Time Tab
tabItem(tabName = "time",
fluidRow(
sidebarPanel(
radioButtons("time", label = h3("Sales by time"),
choices = list("Weekdays" = 1, "Daily hours" = 2),
selected = 1)
),
mainPanel(
plotOutput("time")
)
)
),
# Sales Overview Tab
tabItem(tabName = "salesoverview",
fluidRow(
sidebarPanel(
selectInput("salesoverview", label = h3("Total sales per gender"),
choices = list('Total sales per gender' = 1, 'Total sales per type of product' = 2, "Total sales per credit rating" = 3, 'Total sales per membership' = 4),
selected = 1)
),
mainPanel(
plotOutput("salesoverview")
)
)
),
# Gender Tab
tabItem(tabName = "gender",
fluidRow(
sidebarPanel(
selectInput("gender", label = h3("Gender"),
choices = list('Type of product' = 1, 'Membership' = 2),
selected = 1)
),
mainPanel(
plotOutput("gender")
)
)
),
# Membership Tab
tabItem(tabName = "membership",
fluidRow(
box(plotOutput("membership"), width = 12)
)
),
# Rating Tab
tabItem(tabName = "rating",
fluidRow(
box(plotOutput("rating"), width = 12)
)
),
# Clustering Tab
tabItem(tabName = "clustering",
fluidRow(
sidebarPanel(
numericInput("clusters", "Number of clusters:", 3, min = 1, max = 10)
),
mainPanel(
plotOutput("cluster_plot")
)
)
)
)
)
)