-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
100 lines (82 loc) · 2.61 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
# load the required packages
library(shiny)
require(shinydashboard)
library(ggplot2)
library(dplyr)
# library(MASS) # to access Animals data sets
# library(scales) # to access break formatting functions
# #library(ggthemes)
#
library(editheme)
library(RColorBrewer)
library(DT)
###
#++
library(viridis) # Color palette
library(lubridate)
library(tibble)
##----------------
source('load.R', local = TRUE)
source('waffle.R', local = TRUE)
#source('dataTables.R', local = TRUE)
##---------------------
#Dashboard header carrying the title of the dashboard
header <- dashboardHeader(title = "Apple itunes statistics")
#Sidebar content of the dashboard
sidebar <- dashboardSidebar(
sidebarMenu(
## year select
selectInput("variable", label=h4("Year"),
choices = unique(df$y)),
submitButton("update",icon("refresh")),
dateInput("date", label = h4("Rank by Date"), value = "2016-01-01",
min = "2016-01-01", max = "2016-12-30",
format = "dd/mm/yyyy"),
submitButton("filter",icon("filter")),
# div(style="display:inline-block;width:50%;text-align: center;",submitButton("update1", label = "update", icon = icon("refresh"))),
menuItem("Dashboard", tabName = "dashboard1", icon = icon("dashboard")),
menuItem("DataTable", tabName = "dataTable1", icon = icon("th-list",lib='glyphicon')),
menuItem("Data-source", icon = icon("send",lib='glyphicon'),
href = "https://github.com/ramamet/applestoreR")
)
)
frow1 <- fluidRow(
valueBoxOutput("value1")
,valueBoxOutput("value2")
,valueBoxOutput("value3")
)
frow2 <- fluidRow(
box(width=12,align="center",
title = "Waffle Chart Visualizations"
,status = "primary"
,solidHeader = TRUE
,collapsible = TRUE
,plotOutput("yrRelPlot", height ="250px", width="1000px")
)
)
###
frow3 <- fluidRow(
box(width=12,align="center",
title = "Rank List"
,status = "primary"
,solidHeader = TRUE
,collapsible = TRUE
,DT::dataTableOutput('tbl1')
)
)
# combine the two fluid rows to make the body
# combine the two fluid rows to make the body
body <- dashboardBody(tabItems(
tabItem(tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
),
tabName = "dashboard1" , frow1, frow2),
tabItem(tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
),
tabName = "dataTable1" , frow3)
))
#completing the ui part with dashboardPage
ui <- dashboardPage(title = 'apple_info',
header, sidebar, body,
skin='purple')