make_attendance_plot: CES attendance plot

View source: R/attendance_df_plots.R

make_attendance_plotR Documentation

CES attendance plot

Description

A function to make the plot dissagregated by attendance for dashboards from the estimate_cs_values output. .

Usage

make_attendance_plot(
  survey_estimates,
  target = 0.75,
  target_text = "WHO\nminimum target",
  theme_object = NA,
  y_axis_label_reach = "Programme Reach (in %)\n",
  y_axis_label_coverage = "Survey Coverage (in %)\n",
  x_axis_label = "\nImplementation Unit",
  attendance_group_names = c("Does not attend", "Does attend"),
  survey_point_shape = 16,
  survey_point_size = 4,
  nrow_guide = NA
)

Arguments

survey_estimates

A data frame containing the output from the estimate_cs_values function.

target

A numeric value between 0 and 1 to set the WHO target coverage. Default is 0.75.

target_text

A string denoting the text that describes the target. Default is ⁠WHO\nminimun target⁠. Note the ⁠\n⁠ serves to make a new line in the legend text (see output).

theme_object

A ggplot theme object (e.g. theme_classic()) for the plots. Defaults is NA. In that case, the function calls make_sci_theme() to create the default theme. See that function for theme details.

y_axis_label_reach

Y axis label for programme reach. Default is ⁠Programme Reach (in %)\n"⁠. Note the ⁠\n⁠ is included to create a blank line underneath to make space. Same for other axis labels.

y_axis_label_coverage

Y axis label for survey coverage. Default is ⁠Survey Coverage (in %)\n⁠.

x_axis_label

= X axis label denoting the partitions. Default is ⁠Implementation Unit⁠.

attendance_group_names

A string of lenght two giving the names to be shown in the X axis for (in this order always two) non attending SAC and attending SAC. Default is English: ⁠Does not attend⁠, ⁠Does attend⁠.

survey_point_shape

Shape of the survey data point. Default is a filled dot (16).

survey_point_size

Size of the survey data point. Default is 4.

nrow_guide

Number of rows the partition levels shall be shown in. Default is NA which will set it to next integer of the division (number of partition levels / 2) (e.g., if 5 levels, nrow_guide is 3).

Value

A list of plots. Run names(make_overall_plot output) to see them. Call them individually by using ⁠{make_overall_plot output}[[{name of the particular plot}]]⁠.


SCIFoundation/sciCoverageR documentation built on Oct. 31, 2024, 11:45 p.m.