Generates a plot of the cumulative percentage vaccinated since the start of the timeliness window, faceted by dose.
Usage
vt_cdf_plot(
data,
percentile = NULL,
highlight = NULL,
within_ADM1 = NULL,
max_days = NULL,
x_axis = "absolute"
)Arguments
- data
The output from the
immunabc::vt_distributionfunction.- percentile
Numeric (optional). A single percentile (greater than 0 and at most 100) to highlight in the plot. This is inserted as a label for all highlighted areas and for the combined plot. Default is
NULL, which highlights nothing.- highlight
Character (optional). Up to 5 geographic areas to highlight in color. Only available when
datais disaggregated by "ADM1" or "ADM2". Default isNULL, which highlights nothing.- within_ADM1
Character (optional). When analyzing data at the "ADM2" level, this optional character vector lets you specify one or several "ADM1" to filter. Default is
NULL, which means no filtering by "ADM1".- max_days
Numeric (optional). Maximum number of days since the start of the timeliness window to show on the x-axis, useful to trim long tails of late vaccinations. Default is
NULL, which shows up to the day at which 95% of records are vaccinated.- x_axis
Character. Either "absolute" (default), where the x-axis shows the age at vaccination in days, starting at the
age_schedule_lowof each dose; or "relative", where the x-axis shows the days since the start of the timeliness window, starting at 0 for every dose.
Details
The timeliness window of each dose is shaded. If data is disaggregated by geographic area, each area is drawn as a thin grey line for context, and all areas combined are drawn as a single highlighted line. Specific areas can be highlighted in color with highlight. Records vaccinated before the timeliness window and records with a missing date are excluded from the distribution and reported in the caption.