Skip to content

Commit

Permalink
Remove tiff files adjust README
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMay committed May 28, 2020
1 parent a35f404 commit 7b7efa7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 27 deletions.
41 changes: 26 additions & 15 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(

The FragFrame_1 repository includes R code and data to reproduce the analyses shown in the article

**A global synthesis reveals that ecosystem decay exacerbates biodiversity loss with habitat loss**
**Ecosystem decay exacerbates biodiversity loss with habitat loss**

*by Jonathan M. Chase, Shane A. Blowes, Tiffany M. Knight, Katharina Gerstner and Felix May*

Expand All @@ -31,16 +31,31 @@ There are two data files in data folder:

`new_meta_2_merge.csv`: This file contains the meta data for all studies

## Extendend data figs tabs

This folder contains the figures and tables that appear in the supplementary material of the article.
It also provides the model fits and simulation results that are required to reproduce the figures.

## Intermediate results

There are multiple data files in this folder:
This folder contains the estimates of all biodiversity indices for all fragments (_biodiv_frag_) and
of beta-diversity partitioning values for all fragment pairs (_betapart_). The files with different numbers
refer to different methods for the imputation of the area of continuous habitat and the treatment of non-integer abundances.
The reference scenario is labelled with 2_, while the other versions provide robustness checks.

The file `7_resultsS2000_N40000_mp1_nrep2000.csv` contains the simulation results for the random sampling hypothesis
presented in Ext_Dat_Fig1.

## Main results

`7_resultsS2000_N40000_mp1_nrep2000.csv`: contains the results of the simulations for the random sampling hypothesis
There are multiple data files in this folder:

`fragSize_ref.Rdata`: This file contains the models fit to all the data for each metric.

`fragSize_ref_pool.Rdata`: This file contains the models fit to the data with the studies 'pooled' sampling designs removed.

`fragSize_z_score_ref.Rdata`: This file contains the models fit to the z-score transformed biodiversity indices.

`Jne_zi_fragSize.Rdata`: contains the model fit to the nestedness component of Jaccard dissimilarity as a function of patch size difference.

`Jtu_z1i_fragSize.Rdata`: contains the model fit to the turnover component of Jaccard dissimilarity as a function of patch size difference.
Expand All @@ -49,9 +64,7 @@ There are multiple data files in this folder:

`Rth_z1i_fragSize.Rdata`: contains the model fit to the turnover component of Ruzicka dissimilarity as a function of patch size difference.

`samplingS2000_N40000_mp1.png`: illustration of the random sampling hypothesis used to make Extended Data Figure 1.


This folder also contains the figures presented in the main text of the article.

## Pre-processing files

Expand All @@ -68,18 +81,16 @@ This set up needs to be adjusted for specific users and R sessions.
`1_analysis_get_biodiv_new.R`: This file implements the first main part of the analysis, which includes the standardization and estimation of biodiversity parameters and the community dissimilarity partitioning. Based on the data in `fragSAD_predicts_ewers.csv`, this R-script calculates
all biodiversity parameters for all fragments, as well as the incidence- and abundance-based turnover and nestedness components for all fragment pairs.

`2_`: preliminary visual inspection of the data.

`3_`: these files do the second main part of the analysis by fitting models to the standardized data. The output of `3a_fragSize_fit_models.R` is save in the intermediate results folder as `fragSize_ref.Rdata` and `fragSize_ref_pool.Rdata`; similarly, the output of `3d_` (models fit to beta-diversity components) is saved to individual files found in the intermediate results folder.
`2_`: Preliminary visual inspection of the data.

`4_`: this files contain code to conduct visual inpsection of model fits (e.g., plots of residuals, markov chain inspection, posterior predictive checks).
`3_`: These files do the second main part of the analysis by fitting models to the standardized data. The output of `3a_fragSize_fit_models.R` is save in the main results folder as `fragSize_ref.Rdata` and `fragSize_ref_pool.Rdata`; similarly, the output of `3d_` (models fit to beta-diversity components) is saved to individual files found in the main results folder.

`5_`: these files prepare coefficients and posterior distributions for plotting.
`4_`: These files contain code to conduct visual inspection of model fits (e.g., plots of residuals, Markov chain inspection, posterior predictive checks).

`6_`: these files plot results as they are presented in the main manuscript text. Results needed to execute all these scripts are in the intermediate results folder.
`5_`: These files prepare coefficients and posterior distributions for plotting.

`7_`: these files plot results as they are presented in the extended data section.
`6_`: These files plot results as they are presented in the main manuscript text.

`8_EAR_sims`: code to simulate expected extinctions using the endemics area relationship for the random sampling hypothesis and ecosystem decay scenarios.
`7_`: These files plot results as they are presented in the extended data section. These files also provide the simulations and model fits required for the extended data section.

`99_gg_legend`: function for plotting legends as separate panels.
`99_gg_legend`: Function for plotting legends as separate panels.
58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FragFrame\_1
<!-- badges: end -->
The FragFrame\_1 repository includes R code and data to reproduce the analyses shown in the article

**A global synthesis reveals that ecosystem decay exacerbates biodiversity loss with habitat loss**
**Ecosystem decay exacerbates biodiversity loss with habitat loss**

*by Jonathan M. Chase, Shane A. Blowes, Tiffany M. Knight, Katharina Gerstner and Felix May*

Expand All @@ -22,27 +22,61 @@ There are two data files in data folder:

`new_meta_2_merge.csv`: This file contains the meta data for all studies

R scripts
---------
Extendend data figs tabs
------------------------

### Pre-processing files
This folder contains the figures and tables that appear in the supplementary material of the article. It also provides the model fits and simulation results that are required to reproduce the figures.

`0_init_dirs_load_packages.R`: This script loads necessary R packages and sets up path and working directories. This set up needs to be adjusted for specific users and R sessions.
Intermediate results
--------------------

This folder contains the estimates of all biodiversity indices for all fragments (*biodiv\_frag*) and of beta-diversity partitioning values for all fragment pairs (*betapart*). The files with different numbers refer to different methods for the imputation of the area of continuous habitat and the treatment of non-integer abundances. The reference scenario is labelled with 2\_, while the other versions provide robustness checks.

The file `7_resultsS2000_N40000_mp1_nrep2000.csv` contains the simulation results for the random sampling hypothesis presented in Ext\_Dat\_Fig1.

Main results
------------

There are multiple data files in this folder:

`fragSize_ref.Rdata`: This file contains the models fit to all the data for each metric.

`fragSize_ref_pool.Rdata`: This file contains the models fit to the data with the studies 'pooled' sampling designs removed.

`fragSize_z_score_ref.Rdata`: This file contains the models fit to the z-score transformed biodiversity indices.

`Jne_zi_fragSize.Rdata`: contains the model fit to the nestedness component of Jaccard dissimilarity as a function of patch size difference.

`Jtu_z1i_fragSize.Rdata`: contains the model fit to the turnover component of Jaccard dissimilarity as a function of patch size difference.

`Rne_zi_fragSize.Rdata`: contains the model fit to the nestedness component of Ruzicka dissimilarity as a function of patch size difference.

`Rth_z1i_fragSize.Rdata`: contains the model fit to the turnover component of Ruzicka dissimilarity as a function of patch size difference.

This folder also contains the figures presented in the main text of the article.

Pre-processing files
--------------------

`0_preproc_wide_to_long_format.R`, `0_preproc_ewers_et_al_2007.R`, `0_preproc_predicts_data.R`: These three files do the pre-processing of raw data. Essentially, these three files create the data file `fragSAD_predicts_ewers.csv`, which is published in this repository. The single study data files that are the input for the pre-processing files are not published here and therefore, this files cannot be re-run as they are.

### Main analysis
R scripts
---------

`0_init_dirs_load_packages.R`: This script loads necessary R packages and sets up path and working directories. This set up needs to be adjusted for specific users and R sessions.

`1_analysis_get_biodiv_new.R`: This file implements the first main part of the analysis, which includes the standardization and estimation of biodiversity parameters and the community dissimilarity partitioning. Based on the data in `fragSAD_predicts_ewers.csv`, this R-script calculates all biodiversity parameters for all fragments, as well as the incidence- and abundance-based turnover and nestedness components for all fragment pairs.

`2_`: these files do some preliminary visual inspection of the data.
`2_`: Preliminary visual inspection of the data.

`3_`: These files do the second main part of the analysis by fitting models to the standardized data. The output of `3a_fragSize_fit_models.R` is save in the main results folder as `fragSize_ref.Rdata` and `fragSize_ref_pool.Rdata`; similarly, the output of `3d_` (models fit to beta-diversity components) is saved to individual files found in the main results folder.

`3_`: these files do the second main part of the analysis by fitting models to the standardized data.
`4_`: These files contain code to conduct visual inspection of model fits (e.g., plots of residuals, Markov chain inspection, posterior predictive checks).

`4_`: this files contain code to conduct visual inpsection of model fits (e.g., plots of residuals, markov chain inspection, posterior predictive checks).
`5_`: These files prepare coefficients and posterior distributions for plotting.

`5_`: these files prepare coefficients and posterior distributions for plotting.
`6_`: These files plot results as they are presented in the main manuscript text.

`6_`: these files plot results as they are presented in the main manuscript text.
`7_`: These files plot results as they are presented in the extended data section. These files also provide the simulations and model fits required for the extended data section.

`7_`: these files plot results as they are presented in the extended data section.
`99_gg_legend`: Function for plotting legends as separate panels.
Binary file removed extended_data_figs_tabs/Ex_Dat_Fig3.tiff
Binary file not shown.
Binary file removed extended_data_figs_tabs/Ex_Dat_Fig8.tiff
Binary file not shown.

0 comments on commit 7b7efa7

Please sign in to comment.