CmlMagneville / NCSSDGproj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Co-benefits and trade-offs between Natural Climate Solutions and Sustainable Development Goals

This repository contains data and code used to obtain results of the paper Mariani et al. (202?) - Co-benefits and trade-offs between Natural Climate Solutions and Sustainable Development Goals submitted in Nature Climate Change.

Contents

๐Ÿ“ rawdata directory contains the table of positive and negative links used to perform all analysis. See Material & Methods section of the paper for more details. This directory also contains SDGโ€™s and NCSโ€™s icons use in the figures of the paper.

๐Ÿ“ results directory contains all .RData files generated during the analyses.

๐Ÿ“ R directory contains the functions used to perform all the analyses. The 4 main importants .R files are:

  1. ๐Ÿ“– read_data.R contains functions to read data.
  2. ๐Ÿ“ฆ format_data.R contains functions to format the data in the desired format to make the analyses and figures.
  3. ๐Ÿ”ฌ analysis.R contains functions to perform statistical analyses, mainly null models and correspondance analysis.
  4. ๐Ÿ“Š plot_data.R contains all functions to obtain plots in the paper.

๐Ÿ“ figures directory contains all figures (format .png) in the paper.

๐Ÿ“ make_results contains detailled R scripts to produce figures and run analysis using all functions in R.

The ๐Ÿ’ผ make.R file allows to produce all analyses and render the corresponding plots by running R scripts in make_results.

The ๐Ÿ”จ dev_history.R file allows to rebuild our research compendium from scratch.

How to run it?

This research compendium has been developed using the statistical programming language R. To work with the compendium, you will need installed on your computer the following softwares:

You can download the compendium by cloning this repository. You can follow this tutorial, section โ€œClone the repository with RStudioโ€ to clone the repository.

Once the compendium is cloned, follow these steps:

  1. open the .Rproj file in RStudio.
  2. open make.R and run it to produce all analyses.

Note that R version 3.6.2 or later is required. Run this command utils::sessionInfo() to check your R version.
You can uptade your R version here.

Session Info

utils::sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19042)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252   
#> [3] LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
#> [5] LC_TIME=French_France.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] compiler_4.1.0    magrittr_2.0.1    tools_4.1.0       htmltools_0.5.1.1
#>  [5] yaml_2.2.1        stringi_1.7.3     rmarkdown_2.9     knitr_1.33       
#>  [9] stringr_1.4.0     xfun_0.24         digest_0.6.27     rlang_0.4.11     
#> [13] evaluate_0.14

Licenses

Text and figures: CC-BY-4.0

Code: See the DESCRIPTION file

Data: CC-0 attribution requested in reuse

About


Languages

Language:R 100.0%