load_covid | R Documentation |
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.
load_covid(country_name, state_name = NULL, last_date)
country_name |
string specifying the country of interest.
Check |
state_name |
optional string specifying the state of interest - only brazilian states currently
available in the database. |
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. |
The current version of this function uses the covid19br
package
to retrieve the data. Be aware that the country names might have
been altered between different package versions. Check country_list()
for the
updated list of country_name
options.
An object of S3 class pandemicData
. It is a list with 3 items:
data
: data frame with the number of cumulative cases, new cases, cumulative deaths and new deaths associated
with Covid-19 for each date, up to the last_date
in the specified region.
name
:string with the country name (and state name, if available).
population
:numeric object that contains the population size of the given region.
CovidLP Team, 2020. CovidLP: Short and Long-term Prediction for COVID-19. Departamento de Estatistica. UFMG, Brazil. URL: http://est.ufmg.br/covidlp/home/en/
country_list
, state_list
, pandemic_model
,
posterior_predict.pandemicEstimated
, pandemic_stats
and
plot.pandemicPredicted
.
## Not run: load_covid("Brazil","MG") load_covid(country_name = "India", last_date = "2020-06-15") load_covid("United States of America") load_covid(country_name = "italy") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.