generated from Covid19R/covid19_package_template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
93 lines (64 loc) · 2.81 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
warning = FALSE
)
```
# covid19tunisia
<!-- badges: start -->
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-orange.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![CRAN status](https://www.r-pkg.org/badges/version/YOUR_PACKAGE)](https://CRAN.R-project.org/package=covid19tunisia)
[![Travis build status](https://travis-ci.org/Covid19R/covid19tunisia.svg?branch=master)](https://travis-ci.org/USER_OR_ORG/covid19tunisia)
<!-- badges: end -->
The covid19tunisia package harvests the data made freely available by [Mouna Belaid](https://github.com/MounaBelaid/covid19datatunisia).
## Installation
From CRAN:
``` {r install, eval=FALSE}
install.packages("covid19tunisia")
```
the development version:
```{r install_github, eval = FALSE}
devtools::install_github("USER_OR_ORG/covid19tunisia")
```
## Data
```{r example}
library(covid19tunisia)
```
Get the full dataset:
```{r}
(tunisia <- refresh_covid19tunisia())
```
To switch to a wider format, you can use `tidyr`:
```{r}
tunisia %>%
tidyr::pivot_wider(
names_from = "data_type"
) %>%
dplyr::select(
1, 6:ncol(.), everything()
)
```
For more info on the dataset:
```{r}
get_info_covid19tunisia()
```
## Columns
The data follows the [covid19R standard for tidy Covid-19 data](https://covid19r.github.io/documentation/data-format-standard.html). 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.
## Contributing
Please submit [issues](https://github.com/Covid19R/covid19tunisia/issues) and [pull requests](https://github.com/Covid19R/covid19tunisia/pulls) with any package improvements!
Please note that the 'covid19tunisia' project is released with a
[Contributor Code of Conduct](https://github.com/Covid19R/covid19tunisia/blob/master/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.