covid19.data: function to read "live" data from reported covid19 cases

View source: R/covid19.R

covid19.dataR Documentation

function to read "live" data from reported covid19 cases

Description

function to read "live" data from reported covid19 cases

Usage

covid19.data(
  case = "aggregated",
  local.data = FALSE,
  debrief = FALSE,
  acknowledge = FALSE
)

Arguments

case

a string indicating the category of the data, possible values are: "aggregated" : latest number of cases *aggregated* by country, "ts-confirmed" : time data of confirmed cases, "ts-deaths" : time series data of fatal cases, "ts-recovered" : time series data of recovered cases, "ts-ALL" : all time series data combined, "ts-confirmed-US" : time series data of confirmed cases for the United States, "ts-deaths-US" : time series data of fatal cases for the United States, "ts-dep-confirmed" : time series data of confirmed cases as originally reported (depricated), "ts-dep-deaths" : time series data of deaths as originally reported (depricated), "ts-dep-recovered" : time series data of recovered cases as originally reported (depricated), "ALL": all of the above "ts-Toronto" : data for the City of Toronto, ON - Canada

local.data

boolean flag to indicate whether the data will be read from the local repo, in case of connectivity issues or data integrity

debrief

boolean specifying whether information about the read data is going to be displayed in screen

acknowledge

boolean flag to indicate that the user acknowledges where the data is coming from. If FALSE, display data acquisition messages.

Value

a dataframe (or a list in the case of "ALL") with the daily worlwide indicated type of data per country/region/city

Examples


# reads all possible datastest, returnin a list
covid19.all.datasets <- covid19.data("ALL")

# reads the latest aggregated data
covid19.ALL.agg.cases <- covid19.data("aggregated")
# reads time series data for casualities
covid19.TS.deaths <- covid19.data("ts-deaths")


covid19.analytics documentation built on Oct. 16, 2023, 1:06 a.m.