View source: R/data_visualization.R
get_capl_bar_plot | R Documentation |
This function renders a bar plot for a given CAPL-2 domain score, grouped by CAPL-2 interpretative categories.
get_capl_bar_plot( score = NA, interpretation = NA, x_label = "Interpretation", y_label = "Score", colors = c("#333376", "#00a79d", "#f26522", "#a6ce39") )
score |
A numeric vector. |
interpretation |
A character vector representing CAPL-2 interpretative categories ("beginning", "progressing", "achieving", "excelling"). |
x_label |
An optional character vector representing the x-axis label. This argument is set to "Interpretation" by default. |
y_label |
An optional character vector representing the y-axis label. This argument is set to "Score" by default. |
colors |
An optional character vector representing the color palette for the bars. This argument is set to CAPL-2 branding colors by default (c("#333376", "#00a79d", "#f26522", "#a6ce39", "#747474")). |
Other capl
functions called by this function include: validate_character()
, validate_number()
and capitalize_character()
.
Renders a ggplot2 bar plot (if valid).
capl_results <- get_capl_demo_data(n = 25) get_capl_bar_plot( score = capl_results$capl_score, interpretation = capl_results$capl_interpretation, x_label = "Overall physical literacy interpretation", y_label = "Overall physical literacy score", )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.