query1: Query 1

View source: R/queries.R

query1R Documentation

Query 1

Description

For each country, count the total number of cases, deaths, and the number of days passed since the first day of the outbreak (day of the first recorded new case) up to the day of the first peak stringency index (both inclusive).

Usage

query1(
  plot_type = "static",
  fill = "cases",
  log_scale = FALSE,
  projection = "mercator",
  palette = "YlOrBr"
)

Arguments

plot_type

"static" | "dynamic"

fill

"cases" |"deaths" |"days" - The map will be filled by this variable.

log_scale

FALSE | TRUE - Apply a log transformation on the selected variable? Could be useful if variable contains outliers.

projection

"mercator" | "globular" | "gilbert"

palette

"YlOrBr" or any sequential palette from RColorBrewer: "YlOrRd", "YlOrBr", "YlGnBu", "YlGn", "Reds", "RdPu", "Purples", "PuRd", "PuBuGn", "PuBu", "OrRd", "Oranges", "Greys", "Greens", "GnBu", "BuPu", "BuGn", "Blues".

Value

Either a static map produced with ggplot2 or a dynamic one produced with leaflet.


tomzhang255/covidviz documentation built on May 15, 2022, 6:59 a.m.