-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.R
More file actions
293 lines (276 loc) · 11.3 KB
/
app.R
File metadata and controls
293 lines (276 loc) · 11.3 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
library(shiny)
ui <- fluidPage(
titlePanel("GPA Improvement Simulator"),
div(
style = "background-color:#f2f2f2; padding: 10px; margin-bottom: 10px; border-radius: 5px;",
HTML(
"<strong>You're here because you care—and that’s a powerful first step.</strong> This tool is meant to support your success, not to judge it."
)
),
sidebarLayout(
sidebarPanel(
p(
"📌 Enter your current academic profile from Workday, and future plans to see how different grades can impact your GPA."
),
numericInput(
"cumulative_attempted",
"Cumulative Hours Attempted:",
value = 115,
min = 0
),
numericInput(
"cumulative_earned",
"Cumulative Hours Earned:",
value = 84.5,
min = 0
),
numericInput(
"gpa_hours",
"Cumulative GPA Hours:",
value = 100,
min = 0
),
numericInput(
"current_gpa",
"Cumulative GPA:",
value = 1.8,
min = 0,
max = 4,
step = 0.001
),
numericInput(
"program_gpa",
"Primary Program of Study GPA:",
value = 2.0,
min = 0,
max = 4,
step = 0.001
),
# textInput("class_standing", "Class Standing at Start of Period:", value = "Junior"),
# textInput("load_status", "Load Status:", value = "Full-time"),
numericInput(
"future_credits",
"Planned GPA Credits Next Term:",
value = 15,
min = 0
),
numericInput(
"target_gpa",
"Target GPA:",
value = 1.9,
min = 0,
max = 4,
step = 0.01
),
p(
"💡 This tool is designed to help you explore your options and plan for success. Remember, you’re not alone in this journey!"
),
),
mainPanel(tabsetPanel(
tabPanel(
"Encouragement & Support",
h3("You're Not Alone"),
p(
"This tool helps you make an academic plan—it doesn't define your future."
),
p(
strong("You're not alone:"),
"Many capable students experience academic probation. What matters most is what you do next."
),
p(
"Need help? Reach out to your advisor, a mentor, or visit the ",
a("Student Success Center", href = 'https://class.wfu.edu/', target = "_blank"),
"."
),
p(em(
"Planning is a powerful first step. You've got this."
)),
p(
"This tool was built by Dr. Garrison and inspired by recent research on student success from Dr. Brady. Read more about it at: ",
a(
"More Colleges Are No Longer Putting Students on Academic Probation",
href = "https://www.moorparkcollege.edu/sites/moorparkcollege/files/media/pdf_document/2024/More%20Colleges%20Are%20No%20Longer%20Putting%20Students%20on%20Academic%20Probation..pdf",
target = "_blank"
),
"and the College Transition Collaborative's research brief: ",
a(
"Brady, S. T., Kroeper, K. M., Ozier, E. M., Henderson, A. G., Walton, G. M. & the College Transition Collaborative",
href = "https://sdmiramar.edu/sites/default/files/2023-12/sass_toolkit_researchbrief_final.pdf",
target = "_blank"
)
)
),
tabPanel(
"Your Current Profile",
h3("Your Current Profile"),
tableOutput("studentProfile"),
uiOutput("supportMessage")
),
tabPanel(
"Target GPA Plan",
h3("What You Need to Reach Your Target GPA"),
p(
"📣 Remember: GPA is just one part of your academic story.\n",
"This tool is here to help you plan ahead—you’re not expected to do it alone.\n",
"If you need support, reach out to your academic advisor or a trusted faculty member."
),
uiOutput("neededGrade"),
p(
"💬 If you have questions or need help, please reach out to your academic advisor or a trusted faculty member. They can provide personalized support and resources. Remeber that your tuition and fees support these resources, so please use them!"
),
p(
"📚 For more information on academic support, visit the ",
a(
"Center for Learning, Access, and Student Success",
href = 'https://class.wfu.edu/',
target = "_blank"
),
"."
)
),
tabPanel(
"GPA Projections",
h3("GPA Projections by Grade"),
p(
"📊 This table shows how your GPA could change based on different grades you might earn in the upcoming term."
),
tableOutput("gpaTable"),
p(
"💡 Use this to explore how different grades can help you reach your target GPA."
),
p(
"💬 If you have questions or need help, please reach out to your academic advisor or a trusted faculty member. They can provide personalized support and resources. Remember that your tuition and fees support these resources, so please use them!"
))
)
))
)
server <- function(input, output) {
gpa_scale <- c(
"A" = 4.0,
"A-" = 3.67,
"B+" = 3.33,
"B" = 3.0,
"B-" = 2.67,
"C+" = 2.33,
"C" = 2.0,
"C-" = 1.67,
"D+" = 1.33,
"D" = 1.0,
"D-" = 0.67,
"F" = 0.0
)
# https://bulletin.wfu.edu/undergraduate/procedures/exams-grading/
output$studentProfile <- renderTable({
data.frame(
Metric = c(
"Cumulative Hours Attempted",
"Cumulative Hours Earned",
"Cumulative GPA Hours",
"Cumulative GPA",
"Primary Program GPA"#,
# "Class Standing",
# "Load Status"
),
Value = c(
input$cumulative_attempted,
input$cumulative_earned,
input$gpa_hours,
input$current_gpa,
input$program_gpa#,
# input$class_standing,
# input$load_status
),
stringsAsFactors = FALSE
)
})
output$gpaTable <- renderTable({
current_qp <- input$gpa_hours * input$current_gpa
total_hours <- input$gpa_hours + input$future_credits
projections <- sapply(gpa_scale, function(g) {
future_qp <- g * input$future_credits
total_qp <- current_qp + future_qp
round(total_qp / total_hours, 4)
})
data.frame(
Grade = names(gpa_scale),
`Projected Cumulative GPA` = projections,
check.names = FALSE
)
})
output$neededGrade <- renderUI({
current_qp <- input$gpa_hours * input$current_gpa
total_hours <- input$gpa_hours + input$future_credits
required_total_qp <- input$target_gpa * total_hours
required_future_qp <- required_total_qp - current_qp
required_avg_gpa <- required_future_qp / input$future_credits
closest_letter <- names(gpa_scale)[which.min(abs(gpa_scale - required_avg_gpa))]
if (required_avg_gpa > 4 && FALSE) {
tagList(p(strong(
sprintf(
"To reach a cumulative GPA of %.3f:",
input$target_gpa
)
)), tags$ul(tags$li(
sprintf(
"You would need to earn %.2f quality points across %d GPA credits.",
required_future_qp,
input$future_credits
)
), tags$li(
sprintf(
"This requires an average GPA of %.3f, which is not achievable with standard grades (maximum GPA = 4.0).",
required_avg_gpa
)
)))
} else {
idx <- match(closest_letter, names(gpa_scale))
if (gpa_scale[closest_letter] < required_avg_gpa &&
gpa_scale[closest_letter] < 4) {
next_letter <- names(gpa_scale)[idx - 1]
grade_message <- sprintf(
"This is approximately equivalent to: %s or higher in most classes, with at least one %s.",
closest_letter,
next_letter
)
} else {
grade_message <- sprintf(
"This is approximately equivalent to: %s or higher in all classes.",
closest_letter
)
}
tagList(p(strong(
sprintf(
"To reach a cumulative GPA of %.3f:",
input$target_gpa
)
)), tags$ul(
tags$li(
sprintf(
"You need to earn %.2f quality points across %d GPA credits.",
required_future_qp,
input$future_credits
)
),
tags$li(
sprintf(
"This means an average GPA of %.3f in the upcoming term.",
required_avg_gpa
)
),
tags$li(grade_message)
))
}
})
output$supportMessage <- renderUI({
HTML(
paste(
"<p><strong>You are not alone.</strong> Many students go through academic challenges—this doesn’t define your intelligence, potential, or future.</p>",
"<p>Academic probation is not a punishment. It’s a structured opportunity to get support and make a comeback.</p>",
"<p><strong>You can do this.</strong> Students in your situation have successfully returned to good standing, often within a single term.</p>",
"<p>We recommend reaching out to an academic advisor, tutor, or mentor to make a plan that works for you.</p>",
"<p><a href='https://class.wfu.edu/'>Visit the Center for Learning, Access, and Student Success</a> to learn more about resources available to you.</p>"
)
)
})
}
shinyApp(ui, server)