forked from pspachtholz/BookRecommender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
executable file
·82 lines (73 loc) · 2.53 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
## ui.R
library(shiny)
library(shinydashboard)
library(recommenderlab)
library(data.table)
library(ShinyRatingInput)
library(shinyjs)
library(dplyr)
source('functions/helpers.R')
shinyUI(
dashboardPage(
skin = "blue",
dashboardHeader(title = "Movie Recommender"),
dashboardSidebar(
sidebarMenu(
menuItem("Recommender by Rating", tabName = "rating"),
menuItem("Recommender by Genre", tabName = "genre")
)
),
dashboardBody(
tabItems(
# First tab content
tabItem(tabName = "rating",
includeCSS("css/movies.css"),
fluidRow(
box(width = 12, title = "Step 1: Rate as many movies as possible", status = "info", solidHeader = TRUE, collapsible = TRUE,
div(class = "rateitems",
uiOutput('ratings2')
)
)
),
fluidRow(
useShinyjs(),
box(
width = 12, status = "info", solidHeader = TRUE,
title = "Step 2: Discover movies you might like",
br(),
withBusyIndicatorUI(
actionButton("btn2", "Click here to get your recommendations", class = "btn-warning")
),
br(),
tableOutput("results2")
)
)
),
# Second tab content
tabItem(tabName = "genre",
includeCSS("css/movies.css"),
fluidRow(
box(width = 12, title = "Step 1: Select as many movies as possible (this will also determine your favoriate genre)", status = "info", solidHeader = TRUE, collapsible = TRUE,
div(class = "rateitems",
uiOutput('ratings1')
)
)
),
fluidRow(
useShinyjs(),
box(
width = 12, status = "info", solidHeader = TRUE,
title = "Step 2: Discover movies of your favoriate genre based on your selection",
br(),
withBusyIndicatorUI(
actionButton("btn1", "Click here to get your recommendations", class = "btn-warning")
),
br(),
tableOutput("results1")
)
)
)
)
)
)
)