Prep Data for Bar Graph
iidda_prep_bar.RdPrep data for plotting bar graphs. Prep steps were taken from LBoM::monthly_bar_graph and LBoM::weekly_bar_graph
and they include handling missing values and aggregating series data by time unit grouping variable.
Usage
iidda_prep_bar(
  data,
  series_variable = NULL,
  time_variable = NULL,
  time_unit = NULL,
  handle_missing_values = HandleMissingValues(na_remove = FALSE, na_replace = NULL),
  handle_zero_values = HandleZeroValues(zero_remove = FALSE, zero_replace = NULL)
)Arguments
- data
 data frame containing time series data
- series_variable
 column name of series variable in
data, default is "deaths"- time_variable
 column name of time variable in
data, default is "period_end_date"- time_unit
 time unit to sum series data over, must be one of iidda.analysis:::time_units, defaults to "week".
- handle_missing_values
 function to handle missing values, defaults to HandleMissingValues
- handle_zero_values
 function to handle zero values, defaults to HandleZeroValues