load_covid: Load Covid-19 Data

Description Usage Arguments Value Source References See Also Examples

View source: R/load_covid.R

Description

This function pulls Covid-19 data up to a certain date, for a specified country (and state, if country_name = "Brazil"). The output of this function is in the correct format to be used directly into the model adjustment function pandemic_model included in this package.

The user must online for this function to work.

Usage

1
load_covid(country_name, state_name, last_date)

Arguments

country_name

Character string specifying the country of interest. Check country_list() for the list of countries available in the database.

state_name

Optional character string specifying the state of interest - only brazilians states currently available in the database. state_name should be NULL or a string of length 2. Check state_list() for the state abbreviations that will be used and the corresponding state names.

last_date

Optional date, character or factor argument specifying the last date in the data. It should be in the YYYY-MM-DD or YYYY/MM/DD format.The default is the most recent date available in the database.

Value

A list with 3 items.

Source

https://github.com/CSSEGISandData/COVID-19 https://github.com/covid19br/covid19br.github.io

References

CovidLPTeam, 2020. CovidLP: Short and Long-term Prediction for COVID-19. Departamento de Estatistica. UFMG, Brazil. URL: http://est.ufmg.br/covidlp/home/en/

See Also

country_list state_list pandemic_model posterior_predict.pandemicEstimated plot.pandemicPredicted

Examples

1
2
3
4
load_covid("Brazil","MG")
load_covid(country_name = "India", last_date = "2020-06-15")
load_covid("US")
load_covid(country_name = "italy")

pandemicLP/pandemicLP documentation built on July 18, 2020, 12:37 a.m.