| Title: | Calculate and visualize potential school grades |
|---|---|
| Description: | Convert between German and US grades/GPA systems. Visualize potential final GPA based on current grades and remaining European Credit Transfer and Accumulation points (ECTS). |
| Authors: | Pat Callahan [aut, cre] (ORCID: <https://orcid.org/0000-0003-1769-7580>) |
| Maintainer: | Pat Callahan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-16 05:34:28 UTC |
| Source: | https://github.com/NeuroShepherd/gradecast |
This function calculates the best and worst possible grade averages that can be achieved based on the current grade average, the number of ECTS credits already completed, and the number of remaining ECTS credits to complete.
calculate_grade_range( completed_ects, current_grade, remaining_ects, max_passing_grade = 1, min_passing_grade = 5 )calculate_grade_range( completed_ects, current_grade, remaining_ects, max_passing_grade = 1, min_passing_grade = 5 )
completed_ects |
the number of ECTS credits already completed |
current_grade |
the current grade average |
remaining_ects |
the number of ECTS credits remaining to complete |
max_passing_grade |
the best possible grade |
min_passing_grade |
the worst possible grade |
a vector with the best and worst possible grade averages
calculate_grade_range(120, 3.5, 60) calculate_grade_range(120, 3.5, 60, 1, 5)calculate_grade_range(120, 3.5, 60) calculate_grade_range(120, 3.5, 60, 1, 5)
Builds the text caption for the grade range plot. The caption can be optionally turned off on the ggplot2 object which is useful when the text is not needed or rendered well on the image file. Instead, the Shiny app creates a separate text box for the caption.
caption_builder( min_passing_grade, max_passing_grade, caption_width = 150, show_caption = TRUE )caption_builder( min_passing_grade, max_passing_grade, caption_width = 150, show_caption = TRUE )
min_passing_grade |
the worst possible grade |
max_passing_grade |
the best possible grade |
caption_width |
text width for the caption. default 150 |
show_caption |
whether or not to display the text caption |
a character string
caption_builder(min_passing_grade = 5, max_passing_grade = 1)caption_builder(min_passing_grade = 5, max_passing_grade = 1)
This function takes a vector of grade on the German scale and converts them to the "freedom units" scale i.e. to the equivalent American GPA scale. This calculation makes use of the so-called "Bavarian formula."
convert_to_freedom_units(grades, max_passing_grade = 4, min_passing_grade = 1)convert_to_freedom_units(grades, max_passing_grade = 4, min_passing_grade = 1)
grades |
a vector of grades on the German scale |
max_passing_grade |
the maximum passing grade score in the US. Should be 4 always |
min_passing_grade |
the minimum passing grade score in the US. Should be 1 always |
a vector of grades in "freedom units"
convert_to_freedom_units(grades = c(1.3, 2.8))convert_to_freedom_units(grades = c(1.3, 2.8))
Plot grade range
plot_grade_range( completed_ects, current_grade, remaining_ects, max_passing_grade = 1, min_passing_grade = 5, show_caption = T, caption_width = 150 )plot_grade_range( completed_ects, current_grade, remaining_ects, max_passing_grade = 1, min_passing_grade = 5, show_caption = T, caption_width = 150 )
completed_ects |
the number of ECTS credits already completed |
current_grade |
the current grade average |
remaining_ects |
the number of ECTS credits remaining to complete |
max_passing_grade |
the best possible grade |
min_passing_grade |
the worst possible grade |
show_caption |
whether or not to display the text caption |
caption_width |
text width for the caption. default 150 |
a ggplot2 object
# On the German scale plot_grade_range(30, 1.5, 90) # Now the same plot, but on the American scale and converting the grades. # Note the `.` in the `plot_grade_range` function call. This is a placeholder # for the result of the previous function call. convert_to_freedom_units(1.5) %>% plot_grade_range(30, ., 90, max_passing_grade = 4, min_passing_grade = 1)# On the German scale plot_grade_range(30, 1.5, 90) # Now the same plot, but on the American scale and converting the grades. # Note the `.` in the `plot_grade_range` function call. This is a placeholder # for the result of the previous function call. convert_to_freedom_units(1.5) %>% plot_grade_range(30, ., 90, max_passing_grade = 4, min_passing_grade = 1)
Run the Shiny Application
run_app( onStart = NULL, options = list(), enableBookmarking = NULL, uiPattern = "/", ... )run_app( onStart = NULL, options = list(), enableBookmarking = NULL, uiPattern = "/", ... )
onStart |
A function that will be called before the app is actually run.
This is only needed for |
options |
Named options that should be passed to the |
enableBookmarking |
Can be one of |
uiPattern |
A regular expression that will be applied to each |
... |
arguments to pass to golem_opts. See '?golem::get_golem_options' for more details. |