query6: Query 6

query6R Documentation

Query 6

Description

Produces a scatterplot of any two numeric variables from the OWID COVID dataset. Can subset dataset by specifying one or more countries, a time frame; if dataset is large, apply binning.

Usage

query6(
  plot_type = "static",
  x = "new_cases",
  y = "new_deaths",
  country = "United States",
  start = NULL,
  end = NULL,
  use_bins = FALSE
)

Arguments

plot_type

"static" | "dynamic"

x

"new_cases" | "new_deaths" | "new_vaccinations" - or any other numeric variable in the OWID COVID dataset found here: https://covid.ourworldindata.org/data/owid-covid-data.csv

y

Any numeric variable other than x.

country

"United States" | "Canada" | "United Kingdom" - or any other country name.

start

The start date of the time frame; by default (NULL) starts from the first available record in the OWID COVID dataset. Or specify any date string in the format "%m-%d-%Y" such as "05-22-2020".

end

The end date of the time frame; by default (NULL) includes the most recent record in the OWID COVID dataset. Or specify any date string in the format "%m-%d-%Y" such as "07-22-2021".

use_bins

TRUE | FALSE - apply binning on the points?

Value

Either a static plot produced with ggplot2 or a dynamic one produced with plotly.


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