create_map_or_table.Rd
Decider for creating a map or a table based on whether all NUTS_ids are found in the shapefile
create_map_or_table(
signals_agg,
data_surveillance,
region,
shape = get_shp_config_or_internal(),
interactive = TRUE,
toggle_alarms = FALSE
)
tibble, aggregated signals over n weeks with columns number of cases, any_alarms and n_alarms aggregate_signals
. This tibble can contain the aggregated signals for multiple categories i.e. state and county.
data.frame, surveillance linelist
character, specifying the variable for the region to be shown should be one of ("country","state", "county","community","region_level1", "region_level2","region_level3")
sf. The shapefile used for mapping. - If an external shapefile path is provided in the configuration file, it is used. - Otherwise, the function defaults to the internal European shapefile (`nuts_shp`). - By default, this parameter is set to `get_shp_config_or_internal()`, which handles this logic dynamically.
boolean identifying whether the plot should be static or interactive
boolean identifying whether the plot should showing number of signals explicitly or only when hovering
a table or a plot depending on whether the matching of the NUTS IDs was fully possible, the table and plots can be interactive or not depening on the interactive parameter, can be class "ggplot" or "plotly" for plot and class "gt_tbl" or "datatables" for table
if (FALSE) {
signals <- input_example %>%
preprocess_data() %>%
get_signals(stratification = c("sex", "county"))
signals_agg <- signals %>% aggregate_signals(number_of_weeks = 6)
create_map_or_table(signals_agg, input_example, "county_id", nuts_shp)
}