digital-wellbeing / global-wbmh

Code supporting our work "Global well-being and mental health in the internet age (Vuorre & Przybylski)"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Global well-being and mental health in the internet age

This repository contains the code and synthetic datasets required to reproduce all analyses reported in Global well-being and mental health in the internet age (Vuorre & Przybylski).

Materials

  • Preprint
    • A publicly available version of our manuscript in advance of peer-review and formal publication
  • GitHub repository
    • A version controlled repository containing all the raw data and code in this project
  • DOI
    • An archived permanent copy of the GitHub repository

Reproducibility

The analyses were conducted in R; steps to reproduce are

  1. Clone the github repo
  • Terminal: git clone https://github.com/digital-wellbeing/global-wbmh.git
    OR
  • RStudio: File -> New Project -> Version Control -> Git -> use the URL from above
  1. Prepare the R environment
  • Terminal: Rscript -e "renv::restore()"
    OR
  • RStudio: Click renv -> Restore Library in the Packages panel
  1. Render the source file ms.Rmd
  • Terminal: Rscript -e 'rmarkdown::render("ms.Rmd")'
    OR
  • RStudio: Open the file and click Knit/Render

If you encounter problems, please open an issue.

The project repo includes the GBD dataset, code to download the ITU dataset (internet; mobile), and a synthetic mock version of the GWP dataset to enable reproducing all our computations. The models take several hours/days each to run---depending on your local computing resources---and therefore the rendering process can take several days. For this reason, the build will fail after having cleaned the data. Then, run models.R with settings specific to your environment/cluster. Once that is done you can render the source file again and it should work.

About

Code supporting our work "Global well-being and mental health in the internet age (Vuorre & Przybylski)"

License:Creative Commons Attribution 4.0 International


Languages

Language:TeX 76.2%Language:R 23.3%Language:Shell 0.3%Language:Makefile 0.2%