Skip to content

gesiscss/PutYourData_CodeSupplement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code and Data Supplement

This repository is a data and code supplement for the paper:

ADD BIBTEX HERE AFTER MANUSCRIPT PUBLICATION

In this paper, we:

  • investigate participants’ willingness to donate WhatsApp chat logs and their actual donation behavior
  • analyze demographic, personality, privacy, and relationship-related predictors of willingness and actual donation behavior
  • conduct univariate (χ², t-tests) and multivariate (logistic regression, LASSO) analyses

This repository enables researchers to reproduce all analyses and results in R.


Structure

The repository is organized as follows:

.
├── checkpoints
├── data
├── helpers
├── outputs
│   ├── multivariate_models
│   ├── plots
│   ├── scale_reliabilities.csv
│   ├── univariate_tests
│   └── variables_removal_freqs_TABLE7.csv
├── runtime
│   └── docs
└── scripts

The files in data and checkpoints are stored on Zenodo, see Data.


Code

The analysis pipeline is implemented in .qmd scripts located in the scripts folder:

00-chat_donation_overview.qmd
01-setup_and_participant_flow.qmd
02-exploratory_data_analysis.qmd
03-data_donation_intentions.qmd
04-actual_data_donations.qmd
05-relationship_description_and_chat_data_exclusion.qmd
06-multivariate_modelling.qmd
07-Survey_scales_reliability.qmd
08-runtime_documentation.qmd

Please ensure you download the data (and optionally checkpoints) from Zenodo before trying to run these scripts

Each script corresponds to a logical step in the analysis and:

  • loads results from previous steps via checkpoints
  • can be executed independently
  • produces intermediate outputs and final tables

To fully reproduce the analysis, see the section on Reproducing Results.


Data

The repository contains code and precomputed data objects representing the results from the manuscript. Due to GitHub file size constraints and as an additional privacy protection measure, the raw data and checkpoints are available upon request to the corresponding author via Zenodo.

https://doi.org/10.5281/zenodo.19428330

Further inquiry about access, please contact:

Julian Kohne

GESIS - Leibniz Institute for the Social Sciences Cologne, Germany

julian.kohne[at]gesis.org


Outputs

All results reported in the manuscript are stored in the outputs folder:

Multivariate Models

  • Logistic regression results (Tables 3 & 6)
  • LASSO regression results (Table 8)

Univariate Tests

  • χ² tests (Tables 1 & 4)
  • t-tests (Tables 2 & 5)

Additional Outputs

  • Scale reliabilities
  • Variable selection summaries (Table 7)
  • Figures used in the manuscript

Runtime

Script Runtime
00-chat_donation_overview.qmd 30s
01-setup_and_participant_flow.qmd 30s
02-exploratory_data_analysis.qmd 30s
03-data_donation_intentions.qmd 1min
04-actual_data_donations.qmd 2min
05-relationship_description_and_chat_data_exclusion.qmd 1min
06-multivariate_modelling.qmd 3min
07-Survey_scales_reliability.qmd 10s
08-runtime_documentation.qmd 10s

The computational environment for development is documented:

  • renv.lock — exact package versions
  • install.R — environment setup script
  • docs — system documentation:
    • installed packages
    • session info
    • system environment

One can also recreate a computational environment using Docker, see next section.


Reproducing Results

To reproduce the results from the paper:

  1. Clone this repository
  2. Download data and checkpoints from Zenodo (access granted via request to corresponding author, see Data)
  3. Place raw data files (and optionally model checkpoints) in the correct folders
    • data/donation_list.csv
    • data/ChatDonations_complete.rds
    • data/SurveyCoder-WhatsApp Nutzungsverhalten und Datenspenden (I)-2024-02-15_16-16-34.csv
    • data/SurveyPreProcessed_15.02.2024.rds
    • data/UniqueDataDonations_15.02.24.rds
    • (Optional): Put all *.RData files in checkpoints
  4. Install Docker, preferably in rootless mode
  5. Run: docker compose up --build; this will check for the existence of all required raw data files in data and then render all quarto files in script.

Important Notes

  • Running the scripts may overwrite existing outputs and checkpoints
  • Some steps (e.g., LASSO modeling) may produce slightly different model parameters if random seeds are required is involved
  • Checkpoints require sufficient RAM (recommended: ≥ 16 GB)
  • File paths are Linux/MacOs specific and might need adaptation on Windows. Use Docker.

About

Code Supplement for the pubilcation "Put your Data where your Mouth is: Exploring the Viability of WhatsApp Data Donations to investigate Interpersonal Relationships"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors