c19_eu_weekly: Weekly plot using ECDC/EUROSTAT data.

Description Usage Arguments See Also Examples

View source: R/c19_eu_plots.R

Description

Weekly plot using ECDC/EUROSTAT data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
c19_eu_weekly(
  indicator,
  continents = c("Asia", "Africa", "Europe", "Oceania", "America"),
  highlight = "BG",
  top_n = 20,
  first_wk = 10,
  lower_y = NA,
  label_fun = round,
  axis_labels = scales::label_number(),
  eu_data = c19_eu_data()
)

Arguments

indicator

one of: "r14_cases", "r14_deaths", "em_1m", hosp_1m", "positivity", "tests_100k"

continents

continents to include (only some stats available outside Europe/EU+)

highlight

country to highlight (EU 2-ltr code, e.g. "EL" for Greece)

top_n

number of lines to label

first_wk

first week in 2020 to plot

lower_y

indicator axis limit (default NA = show all data)

label_fun

function to apply to line labels (default is to round)

axis_labels

axis labels, e.g. scales::label_number(), scales::label_percent()

eu_data

eu data

See Also

Other plot funcs: c19_deaths_age(), c19_deaths_factor(), c19_deaths_map(), c19_deaths_total(), c19_heat(), c19_oblasts(), c19_r_plot(), c19_var_plot()

Examples

1
2
3
4
5
6
7
8
## Not run: 
c19_eu_weekly(indicator = "r14_cases", lower_y = 0)
c19_eu_weekly(indicator = "positivity",
              top_n = 100,
              label_fun = function(x) sprintf("%.1f%%", 100 * x),
              axis_labels = scales::label_percent())

## End(Not run)

StanTraykov/c19bg documentation built on Nov. 2, 2021, 4:46 a.m.