Learn R Programming

covid19.analytics (version 1.0)

covid19.data: 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.data(case = "aggregated", local.data = FALSE, debrief = 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-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

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

Value

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

Examples

Run this code
# NOT RUN {
# reads all possible datastest, returnin a list
covid19.all.datasets <- covid19.data("ALL")
# }
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab