forked from ChrisBeeley/GoogleAnalyticsAdvanced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
83 lines (69 loc) · 2.69 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
###############################
### Google Analytics - ui.R ###
###############################
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Google Analytics"),
sidebarPanel(
conditionalPanel(
condition = "input.theTabs != 'hourly'",
dateRangeInput(inputId = "dateRange",
label = "Date range",
start = "2013-04-01",
max = Sys.Date()
)
),
checkboxInput(inputId = "smoother",
label = "Add smoother?",
value = FALSE),
conditionalPanel(
condition = "input.smoother == true",
selectInput("linearModel", "Linear or smoothed",
list("lm", "loess"))
),
conditionalPanel(
condition = "input.theTabs != 'monthly'",
sliderInput(inputId = "minimumTime",
label = "Hours of interest- minimum",
min = 0,
max = 23,
value = 0,
step = 1
),
sliderInput(inputId = "maximumTime",
label = "Hours of interest- maximum",
min = 0,
max = 23,
value = 23,
step = 1)
),
checkboxGroupInput(inputId = "domainShow",
label = "Show NHS and other domain?",
choices = list("NHS users" = "NHS",
"Other" = "Other"),
selected = c("NHS users", "Other")
),
radioButtons(inputId = "outputType",
label = "Output required",
choices = list("Visitors" = "visitors",
"Bounce rate" = "bounceRate",
"Time on site" = "timeOnSite")),
sliderInput("animation", "Trend over time",
min = 0, max = 80, value = 0, step = 5,
animate=animationOptions(interval=1000, loop=FALSE)),
uiOutput("reacDomains")
),
mainPanel(
tabsetPanel(id ="theTabs",
tabPanel("Summary", textOutput("textDisplay"),
textOutput("queryText"), value = "summary"),
tabPanel("Monthly figures", plotOutput("monthGraph"),
downloadButton("downloadData.trend","Download Graph"),
value = "monthly"),
tabPanel("Hourly figures", plotOutput("hourGraph"),
value = "hourly"),
tabPanel("Animated trend", plotOutput("animateGraph"),
value = "animTab")
)
)
))