library(jsonlite)
df <- read.csv("codebook.csv")
json <- toJSON(df, pretty = TRUE)
write_json(json,"codebook.json")How to Codebook

How to Codebook
How to Codebook
See the D-Psy-FAIR standard (developed by Blask et al from the Leibniz-Institute Psychology)

Save in a human-readable (e.g., .csv) and in a machine-readable (e.g., .json) format!
How to Codebook
Excel file:
Human-readable: ✅ ✅
Machine-readabe: ~
Accessible: 👎

How to Codebook
csv file:
Human-readable: ~ (raw) ✅ (after import)
Machine-readable: ✅
Accessible: ✅

How to Codebook
json file:
Human-readable: ~ (raw)
Machine-readable: ✅ ✅
Accessible: ✅

Excursus: json file format

Excursus: json file format

How to Codebook: Manual
- Step 1: Create your codebook as a csv file
– e.g., create it in Excel first, then export as .csv file - Step 2: Import into R and convert it to a json file
- Step 3: Save both codebook files in the /doc subfolder of your project
- Step 4: Upload both the .csv and the .json-file to the repository
How to Codebook: DataWiz2

How to Codebook
- Resources:
- Video (51 min.): “PTOS 9: Einführung in das Forschungsdatenmanagement mit D-Psy_FAIR“
– siehe v.a.: „Schritt 2: Ein Codebuch erstellen“ ab 29:27
