plot_day_zero: Plot day zero

Description Usage Arguments

View source: R/plot_day_zero.R

Description

Generate a plot with time adjusted for the day at which the outbreak is considered to have started

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
plot_day_zero(
  countries = c("Italy", "Spain", "US", "Germany"),
  ylog = TRUE,
  day0 = 150,
  cumulative = TRUE,
  time_before = 0,
  add_markers = FALSE,
  line_size = 1.5,
  point_size = 1.5,
  point_alpha = 0.9,
  max_date = Sys.Date(),
  calendar = FALSE,
  deaths = FALSE,
  pop = FALSE,
  pop_adjustor = 1e+06,
  by_district = FALSE,
  districts = NULL,
  alpha = 0.8,
  roll = 0,
  roll_fun = "mean",
  color_var = "geo"
)

Arguments

countries

Character vector of country names

ylog

Whether the y-axis should be on log scale

day0

An integer, the number of cumulative cases at which the outbreak is considered to have started

cumulative

Whether to count cases cumulatively

time_before

How many days before outbreak to show

line_size

Size of line

point_size

Size of points

point_alpha

Alpha of points

max_date

The maximum date

calendar

Whether to plot by calendar date

deaths

Whether to show deaths instead of cases

pop

Adjust by population

pop_adjustor

Deaths per x (default million) when doing population adjustment

by_district

Show by district

districts

Show by districts, default FALSE

alpha

alpha of lines

roll

How many days to get rolling values for

roll_fun

Mean or Sum

add_markets

Whether to show lines / circle at outbreak start


databrew/covid19 documentation built on Aug. 24, 2020, 10:39 a.m.