Skip to content

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

License

Notifications You must be signed in to change notification settings

digital-wellbeing/global-wbmh

Repository files navigation

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)"

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages