Bars showing number of cases and coloring around the bar showing whether any signal was generated in the last n weeks for this stratum

plot_barchart(signals_agg, interactive = TRUE, toggle_alarms = FALSE)

Arguments

signals_agg

tibble, aggregated signals which can be obtained from using the function aggregate_signals. It contains the number of cases, any_alarms and n_alarms for one category, i.e. age group summed over the number of weeks used in aggregate_signals.

interactive

boolean identifying whether the plot should be static or interactive

toggle_alarms

boolean identifying whether the plot should showing number of signals explicitly or only when hovering

Value

either a gg or plotly object

Examples

if (FALSE) {
signals_agg_sex <- input_example %>%
  preprocess_data() %>%
  get_signals(stratification = c("sex")) %>%
  aggregate_signals(number_of_weeks = 12)
plot_barchart(signals_agg_sex)
}