Biodiversity resilience in a tropical rainforest

Read full text
Authors: Nico Blüthgen, Nina Farwig, Carsten F. Dormann, H. Martin Schäfer, Juan Ernesto Guevara‐Andino, Gunnar Brehm, Santiago Fernando Burneo, Anne Chao, Ugo Mendes Diniz, David A. Donoso, María‐José Endara, Santiago Erazo
+28 more Sebastián Escobar, Ana Falconí‐López, Heike Feldhaar, Mishell Garcia Villamarin, Nina Grella, Katrin Heer, Michael Heethoff, Alexander Keller, Anna Rebello Landim, Sara Diana Leonhardt, Eva Tamargo Lopez, Diego Marín‐Armijos, Jörg Müller, Karla Neira-Salamea, Eike-Lena Neuschulz, Karen Pedersen, Mark‐Oliver Rödel, Matthias Schleuning, Thomas Schmitt, Arianna Tartara, Boris A. Tinoco, Constance J. Tremlett, Marco Tschapka, Sybille B. Unsicker, Edith Villa‐Galaviz, Michael Staab, Robin L. Chazdon, Robert K Colwell
Cited by: 0

Abstract

This code calculates recovery times, resistance and return rates of biodiversity from data sampled in Reserva Canandé, Ecuador belonging to the manuscript "Biodiversity resilience in a tropical rainforest". Furthermore, all figures that are part of the corresponding papers are created with this code. In this repository, we provide all raw data used for this analysis, as well as calculated values and scripts that were used during the analysis. We provide raw data of observed species per plot in the Folder "Data/Raw_data". Data is either in long format or wide format, depending on taxon. The script "Calculate_metrics.R" produces a table for each taxon containing for each plot, the abundance, Shannon diversity (alpha_q1) and Bray-Curtis distance. In this file we also additionally report the treatment of the plot (active, regeneration or old-growth forest), time since start of recovery (RegTime) and the legacy (cacao, pasture or old-growth). The script "Calculate_metrics_standardized.R" produces a table for each taxon containing for each plot the abundance, species richness (alpha_q0), Shannon diversity (alpha_q1), Simpson diversity (alpha_q2), standardized species richness (alpha_q0_std), standardized Shannon diversity (alpha_q1_std), standardized Simpson diversity (alpha_q2_std), Jacccard-index (beta_q0), Horn-index (beta_q1), Morisita-Horn-index (beta_q2), standardized Jaccard-index (beta_q0_std), standardized Horn-index (beta_q1_std), standardized Morisita-Horn-index (beta_q2_std). In this file we also additionally report the treatment of the plot (active, regeneration or old-growth forest), time since start of recovery (RegTime) and the legacy (cacao, pasture or old-growth). The Python-Script "Calculate_recoverytimes.py" was used to calculate recovery times, resistance and return rates for the metrics reported in files created with the scripts "Calculate_metrics.R". The script fits the negative exponential model given by Eq. 5 to the input dataset and calculates recovery times according to Eq. 6 and resistance according to Eq. 4. The parameter lambda is optimized and used as the return rate. The results are reported in the file "Supplementary_Table_1.csv". We used the Python-Script "Calculate_standardized_recoverytimes.py" to calculate recovery times, resistance and return rates for the standardized metrics produced by the script "Calculate_metrics_standardized.R". The results are reported in the file "Supplementary_Table_3.csv". The files "Supplementary_Table_1.csv" and "Supplementary_Table_3.csv" contain the columns R2, which contains the r-squared value of the fitted function, "RSE", which contains the Residual Standard Error and "Active_equals_OG", which indicates whether the mean value of the respective taxon and index of all the active agriculture (or only cacao or pasture) plots are similar to the mean of the old-growth forest plots within the standard deviations. Random-Forest results for our data were created with the "Random_forest_analysis_legacy.R"-script. Statistical tests to test for the influence of life-history-strategies, trophic level and mobility were done with the "Explain_recoverytimes_legacy.R"-script, which uses Supplementary Tables 1 and 4 as input. Statistical tests to test whether standardized or non-standardized metrics recover quicker were done with the "Standardized_vs_non-standardized_legacy.R"-script. For each study identified in the literature analysis the alpha-diversity Hill-number (q=0) and the beta-diversity Hill-number (q=0) were calculated for each plot using the script "Calculate_metrics_literature.R". The results for each study are stored in the folder "Literature/Data/Taxon" under the respective name of the reference. The code used to calculate these values is stored in "Calculate_recoverytimes_literature.ipynb". Random-Forest results for the literature data was created with the "Random_forest_analysis_literature.R"-script. Figure scripts are named as the figure they produce, apart from Figures 3 and Extended Data Figs. 1 and 2, which were created within the "Calculate_recoverytimes.py"-script. The values and confidence intervals for resistance in Supplementary Tables 1, 3 and 5 need to be multiplied with 100 for a percentage.

Fields of Study & Subjects

Ecology and Vegetation Dynamics Studies Conservation Biodiversity and Resource Management Ecosystem dynamics and resilience

Publication details

Journal / source
Code Ocean
Publication date
1 January 2026
Language
EN