-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
166 lines (154 loc) · 10.1 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(plotly)
# Define UI for application
fluidPage(
# Application title
titlePanel("Kettering SDA Church Attendance"),
tabsetPanel(
# Sidebar with a menu input for data set displayed on the graph
tabPanel(
"Overall",
sidebarLayout(
sidebarPanel(
selectInput("dataset",
label = h3("Attendance data set"),
choices = list("Combined" = "combined",
"In Person" = "in_person",
"Online" = "online"),
selected = "combined"),
p("There are three data sets to choose from: In-person attendance, online audience, and combined in-person + online. The default view is the combined data set."),
selectInput("time",
label = h3("Month"),
choices = list("All" = "all_months",
"January" = "jan",
"February" = "feb",
"March" = "mar",
"April" = "apr",
"May" = "may",
"June" = "jun",
"July" = "jul",
"August" = "aug",
"September" = "sept",
"October" = "oct",
"November" = "nov",
"December" = "dec"),
selected = "all_months"),
p("Select the month to display on the graph")
),
mainPanel(
h3("By the Numbers"),
h4("Current Attendance per week"),
tableOutput("main_table"),
h3("Year-to-date attendance per week"),
tableOutput("year_to_date_table"),
h3("Attendance Over Time"),
plotlyOutput("p"),
h3("Seasonal attendance patterns"),
plotlyOutput("s")
)
)
),
tabPanel(
"Ascent",
sidebarLayout(
sidebarPanel(
selectInput("Ascent_dataset",
label = h3("Attendance data set"),
choices = list("Total" = "Ascent_total",
"In Person" = "Ascent_in_person",
"Online" = "Ascent_online"),
selected = "Ascent_total"),
p("There are three data sets to choose from: In-person attendance, online audience, and total attendance. The default view is total attendance."),
selectInput("Ascent_time",
label = h3("Month"),
choices = list("All" = "all_months",
"January" = "jan",
"February" = "feb",
"March" = "mar",
"April" = "apr",
"May" = "may",
"June" = "jun",
"July" = "jul",
"August" = "aug",
"September" = "sept",
"October" = "oct",
"November" = "nov",
"December" = "dec"),
selected = "all_months"),
p("Select the month to display on the graph")
),
mainPanel(
h3("By the Numbers"),
h4("Current Attendance per week"),
tableOutput("Ascent_main_table"),
h4("Year-to-date attendance per week"),
tableOutput("Ascent_ytd_table"),
h3("Attendance Over Time"),
plotlyOutput("Ascent_plot"),
h3("Seasonal attendance patterns"),
plotlyOutput("Ascent_s")
)
)
),
tabPanel(
"Sanctuary",
sidebarLayout(
sidebarPanel(
selectInput("Sanctuary_dataset",
label = h3("Attendance data set"),
choices = list("Total" = "Sanctuary_total",
"In Person" = "Sanctuary_in_person",
"Online" = "Sanctuary_online"),
selected = "Sanctuary_total"),
p("There are three data sets to choose from: In-person attendance, online audience, and total attendance. The default view is total attendance."),
selectInput("Sanctuary_time",
label = h3("Month"),
choices = list("All" = "all_months",
"January" = "jan",
"February" = "feb",
"March" = "mar",
"April" = "apr",
"May" = "may",
"June" = "jun",
"July" = "jul",
"August" = "aug",
"September" = "sept",
"October" = "oct",
"November" = "nov",
"December" = "dec"),
selected = "all_months"),
p("Select the month to display on the graph")
),
mainPanel(
h3("By the Numbers"),
h4("Current attendance per week"),
tableOutput("Sanctuary_main_table"),
h4("Year-to-date attendance per week"),
tableOutput("Sanctuary_ytd_table"),
h3("Attendance Over Time"),
plotlyOutput("Sanctuary_plot"),
h3("Seasonal attendance patterns"),
plotlyOutput("Sanctuary_s")
)
)
)
),
hr(),
h4("Created by: Jim Milks"),
"Version 5.0",
br(),
"11 June 2024",
br(),
"Code and data available at:",
a(href = "https://github.com/jrmilks74/KetSDA/tree/main", "https://github.com/jrmilks74/KetSDA/tree/main"),
br(),
"Data updated every Monday"
)