Skip to contents

A Cross-sectional map: Average daily incidence for the past number of days specified for each country.

Usage

map_burden(
  df,
  region = NULL,
  time_step = 7,
  bin_breaks = c(0, 1, 10, 25, Inf),
  bin_colors = c(`0- <1` = "#f1e5a1", `1- <10` = "#e7b351", `10- <25` = "#d26230", `25+`
    = "#aa001e")
)

Arguments

df

A data.frame with at least the following columns id, date, new_cases

region

(optional) a character string specifying a DoS or WHO region to zoom to, or NULL if none

time_step

(numeric) number of days to average incidence over

bin_breaks

(numeric) a vector of incidence cut points interpretable by cut

bin_colors

(character) a vector of hex or ggplot colors for the legend. If named, names will be used to label bin_breaks.

Value

Produces a map of burden (incidence per 100,000)

Details

map_burden always produces an average incidence map based on the latest date included in the input data.frame. You should ensure that data are completely observed for each timestep, as average incidence is computed based on index rather than calendar date.