make_sex_plot: CES sex plot

View source: R/sex_df_plots.R

make_sex_plotR Documentation

CES sex plot

Description

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

Usage

make_sex_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",
  sex_group_names = c("Boys", "Men", "Girls", "Women"),
  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⁠.

sex_group_names

A string of lenght four giving the names to be shown in the X axis for (in this order and always four even if fewer cases in the ⁠survey estimates⁠ df) Male SAC, Male Adults, Female SAC, and Female Adults. Default is English: Boys, Men, Girls, and Women.

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.