-
Notifications
You must be signed in to change notification settings - Fork 17
/
README.Rmd
132 lines (94 loc) · 6.85 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
title: "README"
author: "Caspar J. van Lissa"
date: "4/1/2020"
output: github_document
always_allow_html: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# COVID-19 Metadata
A collection of relevant country/city level metadata about the COVID-19 pandemic, made interoperable for secondary analysis. Curated by [Data scientists Against Corona](https://dataversuscorona.com/), collaborators: *Caspar van Lissa*, *Tim Draws*, *Andrii Grygoryshyn*, *Konstantin Tomić*, and *Malte Lüken*.
## Available data sets
The following data sets have been processed:
```{r, echo = FALSE}
dat <- read.csv("datasets.csv", stringsAsFactors = FALSE)
dat$Source <- paste0('<a href = "', dat$URL, '">', dat$Source, '</a>')
dat <- dat[order(dat$Progress), ]
rownames(dat) <- NULL
dat$Folder[dat$Progress == "In progress"] <- "<i>In progress</i>"
dat$Progress <- dat$URL <- NULL
knitr::kable(dat)
```
## Folder structure:
```{r, echo = FALSE}
df <- data.frame(
Folder = c("data", "scripts", "doc"),
Description = c("Metadata sources in .csv format (intermediate formats are acceptable until they can be made tidy).",
"(R)-scripts",
"Documentation for your contribution, ideally in Rmarkdown format. Rmarkdown can contain code chunks. Elaborate functions should be relegated to the 'scripts' folder."),
Permissions = c("Do not edit",
"Human editable",
"Human editable")
)
knitr::kable(df)
```
## How to use
Fork or clone this repository (for GitHub beginners: You can also click the green button that says "Clone or download", and download a .zip). All data are in the `/data` folder. Some data are rarely updated (e.g., annual data), and some are updated daily. To ensure that you have access to the latest data for frequently updated sources, run the R-script in the `run_me.R` file, in the main folder.
## Standards for data
Every source is condensed into one data file in `.csv` format, according to these specifications:
* Data should be available on the country- or community-and-country level.
* Recent data are the focus; if multi-year data is available, older years *can* be dropped
* All variable names should be lower case
* Mandatory variables are `country` (plain text country), and `countryiso3` (ISO3 country code)
* Optionally, a `region` variable can be added
* Data should be in wide format: One row per country, one column per variable
## Standards for data dictionary
A `data_dictionary.csv` is available for each data set, *unless the file contents are immediately clear from the file*. This data dictionary includes:
* `variable`: The name of the variable in the data file
* `description`: The description of this variable
Any other important information per variable can be included in this dictionary, such as sources, weights, etc.
## News
The following issues are ongoing:
* Adding more databases; feel free to make a suggest or request a database [here](https://github.com/cjvanlissa/COVID19_metadata/issues)
* Added time-since first occurrence for Oxford policy / incidence trackers
* Added last observation carried forward for WHO data
## License
This project is under a GNU GPL v3 open source license (see the LICENSE file). Individual data sources have different licenses; always check the license before publishing based on these data.
## Contributing and Contact Information
This project is open for collaborators with valuable expertise. Contribute by:
* Filing a GitHub issue [here](https://github.com/cjvanlissa/COVID19_metadata/issues)
* Making a pull request [here](https://github.com/cjvanlissa/COVID19_metadata/pulls)
By participating in this project, you agree to abide by the [Contributor Code of Conduct v2.0](https://www.contributor-covenant.org/).
# A WORCS Project
This project is based on the Workflow for Open Reproducible Code in Science (WORCS). For more details, please read the preprint at https://osf.io/zcvbs/.
# WORCS - steps to follow for each project
## Study design phase
1. Create a new Private repository on github, copy the https:// link to clipboard
The link should look something like https://github.com/yourname/yourrepo.git
2. In Rstudio, click File > New Project > New directory > WORCS Project Template
a. Paste the GitHub Repository address in the textbox
b. Keep the checkbox for `renv` checked if you want to document all dependencies (recommended)
c. Select a preregistration template
3. Write the preregistration `.Rmd`
4. In the top-right corner of Rstudio, select the Git tab, select the checkboxes next to all files, and click the Commit button. Write an informative message for the commit, e.g., "Preregistration", again click Commit, and then click the green Push arrow to send your commit to GitHub
5. Go to the GitHub repository for this project, and tag the Commit as a preregistration
6. Optional: Render the preregistration to PDF, and upload it to AsPredicted.org or OSF.io as an attachment
7. Optional: Add study Materials (to which you own the rights) to the repository. It is possible to solicit feedback (by opening a GitHub Issue) and acknowledge outside contributions (by accepting Pull requests)
## Data analysis phase
8. Read the data into R, and document this procedure in `prepare_data.R`
9. Use `open_data()` or `closed_data()` to store the data
10. Write the manuscript in `Manuscript.Rmd`, using code chunks to perform the analyses.
11. Regularly commit your progress to the Git repository; ideally, after completing each small and clearly defined task. Use informative commit messages. Push the commits to GitHub.
12. Cite essential references with one at-symbol (`[@essentialref2020]`), and non-essential references with a double at-symbol (`[@@nonessential2020]`).
## Submission phase
13. To save the state of the project library (all packages used), call `renv::snapshot()`. This updates the lockfile, `renv.lock`.
14. To render the paper with essential citations only for submission, change the line `knit: worcs::cite_all` to `knit: worcs::cite_essential`. Then, press the Knit button to generate a PDF
## Publication phase
13. Make the GitHub repository public
14. [Create an OSF project](https://help.osf.io/hc/en-us/articles/360019737594-Create-a-Project); although you may have already done this in Step 6.
15. [Connect your GitHub repository to the OSF project](https://help.osf.io/hc/en-us/articles/360019929813-Connect-GitHub-to-a-Project)
16. Add an Open Science statement to the manuscript, with a link to the OSF project
17. Optional: [Publish preprint in a not-for-profit preprint repository such as PsyArchiv, and connect it to your existing OSF project](https://help.osf.io/hc/en-us/articles/360019930533-Upload-a-Preprint)
+ Check [Sherpa Romeo](http://sherpa.ac.uk/romeo/index.php) to be sure that your intended outlet allows the publication of preprints; many journals do, nowadays - and if they do not, it is worth considering other outlets.