knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", warning = FALSE )
The covid19tunisia package harvests the data made freely available by Mouna Belaid.
From CRAN:
``` {r install, eval=FALSE} install.packages("covid19tunisia")
the development version: ```r devtools::install_github("USER_OR_ORG/covid19tunisia")
library(covid19tunisia)
Get the full dataset:
(tunisia <- refresh_covid19tunisia())
To switch to a wider format, you can use tidyr
:
tunisia %>% tidyr::pivot_wider( names_from = "data_type" ) %>% dplyr::select( 1, 6:ncol(.), everything() )
For more info on the dataset:
get_info_covid19tunisia()
The data follows the covid19R standard for tidy Covid-19 data. The data columns are as follows:
● date - The date in YYYY-MM-DD form.
● location - The name of the government as provided by the data sources.
● location_type - The type of location using the covid19R controlled vocabulary. In this case, it's “state_government”.
● location_code - A standardized location code using a national or international standard. In this case, . See https://www.iso.org/obp/ui/#iso:code:3166:TN for details.
● location_code_type The type of standardized location code being used according to the covid19R controlled vocabulary. Here we use “ISO 3166-2:TN”.
● data_type - the type of data in that given row. Includes cases new : new confirmed Covid-19 cases during on the current date, recovered_new : new number of patients recovered on the current date and deaths_new : new deaths on the current datea.
● value - number of cases of each data type.
Please submit issues and pull requests with any package improvements!
Please note that the 'covid19tunisia' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.