covid19.JHU.data: function to read "live" data as reported by JHU's CCSE...

View source: R/covid19.R

covid19.JHU.dataR Documentation

function to read "live" data as reported by JHU's CCSE repository

Description

function to read "live" data as reported by JHU's CCSE repository

Usage

covid19.JHU.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 "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 Aug. 18, 2022, 9:06 a.m.