DOI: 10.5061/dryad.k0p2ngfh4
title: Data from: Complex temporal dynamics of insect metacommunities along a tropical elevational gradient

description: Unraveling the spatiotemporal dynamics of communities is critical to
 understand how biodiversity responds to global changes. However, this task
 is not trivial, as these dynamics are quite complex, and most studies are
 limited to few taxa at small local and temporal scales. Tropical mountains
 are ideal indicators of biodiversity response since these endangered and
 complex ecosystems include many distinct habitats within small
 geographical areas, harboring a megadiverse fauna, especially insects.
 Indeed, while insects are particularly sensitive to environmental and
 climatic changes, the extent of the impact of climate variability on
 mountain tropical insect diversity remains poorly understood. Here we
 present time-series data from a decade of studying the spatiotemporal
 dynamics of ants, butterflies, and dung beetles. We assessed patterns of
 species richness change along the elevational gradient for each taxonomic
 group per sampling year and cumulatively over years. We then quantified
 community changes over time by measuring the variation in species richness
 across sampling years (temporal trends in α-diversity), and the temporal
 variation in species composition (temporal β-diversity) evaluating species
 gains and losses over time. We also evaluated the variation of air
 temperature and humidity through meteorological stations within the
 sampling years. We detected a classical pattern of species richness
 decline with elevation, albeit with a noticeable increase in species
 richness variation with increasing elevation. The temporal β-diversity
 exhibited considerable variability across elevations, taxa, and time. Only
 dung beetles presented a positive relationship with humidity variation
 over the years. Critically, both rare and common species drove
 extirpations and colonizations, and we found no trend of temporal decline
 of insect species at local and regional scales. Our study shows that
 insect metacommunity responses to elevation and global changes are rather
 complex, and stresses the importance of long-term studies that incorporate
 multiple sampling periods and different groups of organisms in tropical
 mountains.
description: # Complex temporal dynamics of insect metacommunities along a tropical
 elevational gradient
 [https://doi.org/10.5061/dryad.k0p2ngfh4](https://doi.org/10.5061/dryad.k0p2ngfh4) We sent our data (dados clima 2.txt), information on the climate data; (Deltas.txt) with the delta calculations; (ric e delta.txt) with the richness calculations; (ric_ano.txt) richness calculations of the groups by year; (tbi insetos.txt) to evaluate the losses and gains of the insect communities; R script (Análise de clima.R) with all the analyses used. **DADOS CLIMA 2:** -Nome (sampling sites name) \- Elevacao (elevation of the weather station) - Period (pairwise combinations of consecutive surveys years) \- Temp (mean temperature (C°) \- CVTemp (coefficient of variation of mean temperature (C°) \- Umi (humidity mean (%) \- CVUmi (coefficient of variation of mean temperature (C°) **Data RIC E DELTA** -Temp_M (mean temperature (C°)) -TemDV (coefficient of variation of mean temperature (C°)) -Umidade_M (humidity mean (%)) -UmDV (coefficient of variation of mean temperature (C°)) -DeltaRicAnts (variation in ant richness) -DeltaRicButterlies (variation in butterfly richness) -DeltaRicDungbeetles (variation in dung beetles richness) -RicFormiga (ant richness) -RicBorboleta (butterfly richness) -RicRolabosta (dung beetles richness) -Total (total insect richness) -ElevacaoF_RB (mean elevation of pitfall traps in ant and dung beetle transects) -ElevacaoBorb (mean elevation of Van-Someren Rydon traps in butterfly transects) **Planilha DELTAS** - Periodo (pairwise combinations of consecutive surveys years) \- coefvar- TempF_RB (coefficient of variation of mean temperature (°C) for ants and dung beetles) \- coefvarUmF_RB (coefficient of variation of humidity mean (%) for ants and dung beetles) \- coefvarTempBorb (coefficient of variation of mean temperature (C°) for butterflies) -coefvarUmBorb (coefficient of variation of humidity mean (%) for butterflies) -CVAnt (variation in ant richness) -CVBut (variation in butterfly richness) -CVDB: (variation in dung beetles richness) -ElevationDB_A (mean elevation of pitfall traps in ant and dung beetle transects) -ElevationBut (mean elevation of Van-Someren Rydon traps in butterfly transects) **Planilha RIC-ANO** -Altitude (elevation categories) -Nome (sampling sites name) -Site (sampling transect name) -Year (sampling years) -AnoCat (transforming the variable "year" as categorical) -ElevacaoF_RB (mean elevation of pitfall traps in ant and dung beetle transects) -ElevacaoBorb (mean elevation of Van-Someren Rydon traps in butterfly transects) -TempF_RB (mean temperature (°C) for ants and dung beetles) -UmiF_RB (mean humidity (%) for ants and dung beetles) -TempBorb (mean temperature (°C) for butterflies) -UmiBorb (mean humidity (%) for buterflies) -RicAnts (ant richness) -RicButterflies (butterfly richness) -RicDungbeetles (dung beetle richness) **Planilha tbi- insetos** -Nome (sampling sites name) -ElevationDB_A (mean elevation of pitfall traps in ant and dung beetle transects) -ElevationBut (mean elevation of Van-Someren Rydon traps in butterfly transects) -Site (sampling transect name) -Period (pairwise combinations of consecutive surveys years) -LossesAnt (ant species losses) -GainsAnt (ant species gains) -TBIAnt (variation in ant species composition, Temporal Beta-diversity Index) -LossesBut (butterfly species losses) -GainsBut (butterfly species gains) -TBIBut (variation in butterfly species composition, Temporal Beta-diversity Index) -LossesRB (dung beetle species losses) -GainsRB (dung beetle species gains) -TBIRB (variation in dung beetles species composition, Temporal Beta-diversity Index) -coefvarTempF_RB (mean temperature variation (°C) for ants and dung beetles) -coefvarUmF_RB (mean humidity variation (%) for ants and dung beetles) -coefvarTempBorb (mean temperature variation (°C) for butterflies) -coefvarUmBorb (mean humidity variation (%) for butterflies) **Code/Software** R is required to run "Analises de clima"; the script was created using R. Annotations are provided throughout the script through 1) library loading, 2) dataset loading and cleaning, 3) analyses, and 4) figure creation. ## Description of the data and file structure The research was conducted in the southern portion of the Espinhaço mountain range, within the established sampling sites of the Long-Term Ecological Research Project Campos Rupestres (PELD CRSC/CNPq Project). These sampling sites span a range of elevations (800 to 1400 m a.s.l.) in the Serra do Cipó region, Minas Gerais State, Brazil  (19º22’01”S, 43º32’17”W). We established seven sampling sites placed 100 m elevational intervals along a gradient. Each sampling site comprised three 200-meter-long transects, with a minimum separation of 250 m between them, resulting in 21 transects (three in each of the seven sampling sites). Surveys were conducted five times over ten years (2013, 2014, 2017, 2019, and 2023), exclusively during the rainy season (between December and February). The sampling method was specific for each insect group. For ant sampling along each transect, 15 non-baited pitfall traps were deployed at 50-meter intervals in each sampling site, totaling 105 traps overall. These pitfall traps consisted of plastic containers (9 cm deep × 15 cm diameter) filled with a solution of 250 ml salt and detergent (5% each) and equipped with rain protection. Dung beetles were sampled using similar pitfall traps but baited with 25 g of human feces and spaced 100 meters apart, resulting in nine traps per sampling site and 63 traps in total. The pitfall traps remained in the field for 48 hours (see Nunes et al. 2016, Castro et al. 2020). For butterfly sampling, Van-Someren Rydon traps baited with fermented bananas and sugar cane juice were employed (Freitas et al. 2014, Beirão et al. 2021). These traps were positioned at 50-meter intervals along each transect, totaling 15 traps per sampling site and 105 traps overall. Each trap remained in the field for five days but was inspected daily to retrieve captured individuals. To elucidate the mechanisms underpinning our hypotheses, we sought to describe climatic variation with precision at each elevation. For climatic factors, data were obtained from weather stations equipped with solar-powered Onset HOBO U30 data-loggers, positioned every 100 meters in elevation. **Data analyses** Initially, rarefaction and extrapolation curves were generated for ants, butterflies, and dung beetles for each sampling site at each elevation. As ants are eusocial insects, their abundance in pitfall traps depends on the specific location of their colonies. Therefore, for ants we used incidence data at the transect level, whereas for butterflies and dung beetles we accounted for every individual, using abundance data. This approach allowed us to assess both the accumulated number of species in each sample and site completeness (measured as sample coverage) (Chao et al. 2014) for ant samples within each sampling unit (transect) and for butterfly and dung beetle samples concerning each individual surveyed (Neves et al. 2021).  Extrapolation curves were constructed with the number of samples or individuals set at twice the actual reference size (Chao et al. 2014, Chao et al. 2020). Sample coverage was estimated for species richness (Hill number of q = 0) with 100 bootstrap replications. The analysis was performed using the R package “iNEXT” (Hsieh et al. 2016). The temporal variations in the species composition of each taxonomic group were measured for each sampling unit (i.e., transect) between pairwise combinations of consecutive surveys, representing temporal β-diversity over sequential sampling years (2013–2014, 2014–2017, 2017–2019, 2019–2023). The Temporal Beta-diversity Index (TBI) approach (Legendre 2019) was employed to assess these changes. TBI measures the changes in species composition over time, and their values can be decomposed into two components: B, indicating species losses from time 1 to time 2, and C, indicating species gains from time 1 to time 2. Subsequently, B-C sampling units were generated, with B (losses per transect) plotted against C (gains per transect) (Legendre 2019). Sørensen dissimilarity for incidence data was used to calculate pairwise dissimilarities. Statistical differences in the [C – B] difference across sampling units were tested using a permutational paired t-test (N = 999 permutations) computed for the C and B statistics from sampling sites. These calculations were performed using the “TBI” and “plot.TBI” functions of the R package “adespatial” (Dray et al. 2022). Additionally, to test whether the differentiation and homogenization processes would have different prevalence in low- or high-vagility insects, we partitioned the temporal changes in spatial β-diversity into their dynamic components of colonization and extirpation. Afterward, we employed separate generalized linear mixed-effect models (GLMMs) to investigate the effects of elevation on two different measures of species richness: accumulated species richness throughout the surveys, and the number of species each year. Sampling year and sampling site were included as random factors in these GLMMs, which were structured as follows: (i) richness accumulated [response variables] ~ transect elevation [predictor variable] + (Year | sampling site) [random slope| random intercept]; (ii) richness per year [response variables] ~ transect elevation [predictor variable] + year (categoric) + interaction elevation: year (categoric) + (Year| sampling site) [random slope| random intercept]. We used the Poisson distribution with an identity link for these GLMMs and simplified them by sequentially removing nonsignificant variables based on their p-values ## References Beirão, M. d. V., Neves, F. d. S. and Fernandes, G. W. 2021. Climate and plant structuredetermine the spatiotemporal butterfly distribution on a tropical mountain. – Biotropica 53: 191-200. Castro, F. S. d., da Silva, P. G., Solar, R., Fernandes, G. W. and Neves, F. d. S. 2020.  Environmental drivers of taxonomic and functional diversity of ant communities in a tropical mountain. – Insect Conserv. Diver. 13: 393-403. Chao, A., Gotelli, N. J., Hsieh, T. C., Sander, E. L., Ma, K. H., Colwell, R. K. and Ellison, A.M. 2014. Rarefaction and extrapolation with Hill numbers: a framework for sampling and estimation in species diversity studies. – Ecol. Monogr. 84: 45-67. Chao, A., Kubota, Y., Zelený, D., Chiu, C.-H., Li, C.-F., Kusumoto, B., Yasuhara, M., Thorn, S., Wei, C.-L., Costello, M. J. and Colwell, R. K. 2020. Quantifying sample completeness and comparing diversities among assemblages. – Ecol. Res. 35: 292- Dray, S., Bauman, D., Blanchet, G., Borcard, D., Clappe, S., Guenard, G., Jombart, T., Larocque, G., Legendre, P., Madi, N. and Wagner, H. H. 2022. Package 'adespatial': Multivariate Multiscale Spatial Analysis. R package version 0.3-20. – In:[https://CRAN.R-project.org/package=adespatial](https://CRAN.R-project.org/package=adespatial). Freitas, A. V. L. Iserhard, C. A., Santos, J. P., Carreira, J. Y. O., Ribeiro, D. B., Melo, D. H.  A., Rosa, A. H. B., Marini-Filho, O. J., Accacio, G. M. and Uehara-Prado, M. (2014). Studies with butterfly bait traps: an overview. – Rev. Colomb. Entomol. 40: 203-212. Hsieh, T. C., Ma, K. H., Chao, A. and McInerny, G. 2016. iNEXT: an R package for rarefaction and extrapolation of species diversity (Hill numbers). – Methods Ecol. Evol. 7: 1451-1456. Legendre, P. 2019. A temporal beta‐diversity index to identify sites that have changed in exceptional ways in space–time surveys. – Ecol. Evol. 9: 3500-3514. Nunes, C. A., Braga, R. F., Figueira, J. E., Siqueira-Neves, F. and Fernandes, G. W. 2016. Dung beetles along a tropical altitudinal gradient: environmental filtering on taxonomic and functional diversity. – PLoS ONE 11: e0157442.