Add column info to item reference

This commit is contained in:
Nora Wickelmaier 2025-10-21 13:25:30 +02:00
parent 1e44bcd3a7
commit de329a505e
4 changed files with 9470 additions and 2 deletions

1
.gitignore vendored
View File

@ -20,7 +20,6 @@
03_data/HMC_variables.xlsx
03_data/01_raw_data/codebook_start.xlsx
03_data/01_raw_data/create_codebook.R
03_data/item_reference.R
*.docx
#*.xlsx

39
03_data/item_reference.R Normal file
View File

@ -0,0 +1,39 @@
#' ---
#' title: "Codebook for cleaned data"
#' author: ""
#' output: github_document
#' ---
#+ echo = FALSE
options(knitr.kable.NA = '')
dat <- openxlsx::read.xlsx("HMC_codebook.xlsx")
#' * `qualtricsname`: Original name as used in the Qualtrics survey, see
#' [materials](../02_material)
#'
#' * `varname`: Variable name used in the CSV files for each wave, see
#' [03_cleaned_data](03_cleaned_data)
#'
#' * `scale`: (Possible) Name of a scale; indicates which items belong to the
#' same scale
#'
#' * `coding`: How variable was coded, e.g., 1: Yes, 2: No, etc.
#'
#' * `inverse`: If item should be inversed before adding it to a scale
#'
#' * `info`: Additional information relevant for item, e.g., correct or open
#' response
#'
#' * `reference`: Reference from which the scale was taken; self means items
#' have been self-generated
#'
#' * `wave`: What wave the item was included in
#'
#' * `description`: Text that was presented to participants for this iteetwd
#+ echo = FALSE
subset(dat, select = c(-wave1, -wave2, -wave3, -wave4, -wave5, -wave6)) |>
knitr::kable()

9406
03_data/item_reference.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,30 @@
Codebook for cleaned data
================
2025-10-17
2025-10-21
- `qualtricsname`: Original name as used in the Qualtrics survey, see
[materials](../02_material)
- `varname`: Variable name used in the CSV files for each wave, see
[03_cleaned_data](03_cleaned_data)
- `scale`: (Possible) Name of a scale; indicates which items belong to
the same scale
- `coding`: How variable was coded, e.g., 1: Yes, 2: No, etc.
- `inverse`: If item should be inversed before adding it to a scale
- `info`: Additional information relevant for item, e.g., correct or
open response
- `reference`: Reference from which the scale was taken; self means
items have been self-generated
- `wave`: What wave the item was included in
- `description`: Text that was presented to participants for this
iteetwd
| qualtricsname | varname | scale | coding | inverse | reference | wave | description |
|:-----------------------------|:------------------------------|:---------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------|:-----------------------------------------------------------------------------------------|:-----------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|