dataesr/scientific-paragraphs-categorization huggingface dataset:
(c) Specific hypotheses (higher values indicate steeper slopes) across datasets. For latitude, spatial distance decay is flatter in the datasets from higher latitude and, more notably, for taxonomic similarities than for functional similarities. Environmental distance decay is steeper in datasets from higher latitude for functional similarities, whereas it does not vary notably with latitude for taxonomic similarities. For spatial extent, both taxonomic and functional spatial distance decay are flatter in the datasets covering a larger spatial extent, whereas environmental distance decay is steeper in datasets covering a larger extent. For realm, marine ecosystems show flatter spatial and environmental distance decay than terrestrial and freshwater systems. Abbreviations: FRE = freshwater systems; MAR = marine systems; TER = terrestrial systems Following the first comprehensive distance decay meta-analysis  (Soininen, McDonald, et al.
| Latitudinal gradients We also generalize the effects of major geographical and environmental factors in the three hypotheses that are tested across the datasets. For example, latitudinal effect has been recognized as a relevant factor in meta-analyses  (Soininen et al. , 2007)  and case studies  (Qian et al. , 2009) , and these studies suggest that β-diversity should decrease with increasing latitude (Figure  1c ). This is indicated by the faster latitudinal decline in γ-diversity than in α-diversity  (Hillebrand, 2004; Soininen, 2010)  and the decrease in slopes of the species-area relationships (proxy for turnover) with latitude  (Drakare et al. , 2005). Moreover, Rapoport's rule  (Stevens, 1989)  postulates that species range sizes are larger at high latitudes, leading to lower β-diversity (but see  Rohde, 1996).
Therefore, we hypothesize (H 2a ) that the rate of taxonomic distance decay along spatial gradients is generally slower in the datasets that originate from higher latitudes. In contrast, functional distance decay along a spatial gradient might be faster in the datasets from higher latitudes because large-scale environmental heterogeneity tends to increase towards the poles  (Soininen & Hillebrand, 2007; Soininen, McDonald, et al. , 2007; Terborgh, 1973). Thus, environmental filtering becomes stronger with increasing latitude  (Jarzyna et al. , 2021; Lamanna et al. , 2014) , leading to functionally clustered communities locally that become increasingly overdispersed along the regional environmental gradient. This would result in a faster rate of functional distance decay along environmental gradients at higher latitudes (H 2b ).
| Realms We also expect the patterns of distance decay to vary among realms. In general, marine ecosystems are environmentally more homogeneous than terrestrial or freshwater ecosystems, at least in the open ocean  (Clarke, 1992) , and typically show weaker dispersal barriers than terrestrial or freshwater ecosystems  (Bierne et al. , 2003; Cornell & Harrison, 2014). Therefore, we hypothesize (H 4 ) that the datasets from marine ecosystems generally have slower rates of taxonomic and functional distance decay than the other ecosystems. Here, we tested these hypotheses using datasets that cover a wide range of biotic groups, from unicellular diatoms to vascular plants, fungi, invertebrates, fish, birds, amphibians and mammals, and that originate from marine, terrestrial and freshwater ecosystems spanning broad latitudinal gradients (Figure  2 ).
To account for major biological differences in biotic groups, we also investigated whether distance decay varied among different-sized taxa or among taxa with different dispersal modes  (Bie et al. , 2012; Jenkins et al. , 2007). By using such a comprehensive, multi-realm and multitaxon dataset, we explore patterns at a more general level compared with case studies that have examined both taxonomic and functional β-diversity but considered only a single or few biotic groups.
| Data collection We gathered our data by directly contacting data owners or using the existing data sources, such as GrassPlot  (Biurrun et al. , 2021; Dengler et al. , 2018) , sPlot  (Bruelheide et al. , 2019)  and CESTES  (Jeliazkov et al. , 2020). We included datasets that provided raw data of species abundances, functional traits, environmental variables and spatial coordinates of the study sites. A few datasets (n = 6) provided only species occurrence rather than abundance information (Supporting Information Appendix S1). The traits included in the datasets were chosen by data owners from a suite of traits that should respond well to environmental variation. For plant datasets compiled from the sPlot database, trait information was commonly derived from the TRY database  (Kattge et al.
, 2011). Regarding the CESTES database, we compiled 48 datasets, specifically from: fish communities  (Brind'Amour et al. , 2011; Chong-Seng et al. , 2012; Cleary et al. , 2016; Villéger et al. , 2012) , terrestrial vascular plants  (Bagaria et al. , 2012; Chmura et al. , 2016; Eallonardo et al. , 2013; Frenette-Dussault et al. , 2011; Fried et al. , 2012; Jamil et al. , 2013;  van Spatial extent (km)  Raevel et al. , 2012; Ribera et al. , 2001; Robroek et al. , 2017) , aquatic macroinvertebrates  (Díaz et al. , 2007; Gallardo et al. , 2009; Jeliazkov et al. , 2014) , terrestrial arthropods  (Barbaro & van Halder, 2009; Barbosa et al. , 2015; Bartonova et al. , 2016; Dziock et al. , 2011; Gibb et al. , 2015; Gonҫalves-Souza et al. , 2014; van Klink et al. , 2017; Krasnov et al. , 2015; Lowe et al.
, 2018) , birds  (Barbaro et al. , 2012 (Barbaro et al. , , 2017;; Barbaro & van Halder, 2009; Charbonnier et al. , 2016; Cleary & Renema, 2007; Meffert & Dziock, 2013) , bats  (Charbonnier et al. , 2016; Farneda et al. , 2015) , bryophytes  (Robroek et al. , 2017) , butterflies  (Bartonova et al. , 2016; Robinson et al. , 2014) , corals (Rachello-Dolmen & Cleary, 2007) and foraminifera  (Cleary & Renema, 2007). We included only datasets with ≥10 sites, two environmental variables and three traits or trait categories. In some cases, more than one dataset, representing different taxonomic groups with different responses to the environment and dispersal abilities (e. g. , stream macroinvertebrates and diatoms) was collected in the same study area. In total, 148 datasets representing 17 major biotic groups from terrestrial (n = 87), freshwater (n = 41) and marine (n = 21) environments were assembled, amounting to >17,000 study sites around the globe (Figure  2 ).
Of the 148 datasets, 118 were published in peer-reviewed journals (Appendix S1). Taxa were identified mostly to species or morphospecies; in a few cases, we used data at the genus level if existing taxonomic knowledge did not allow individual species to be distinguished. Within biotic groups, traits were generally the same or at least covered similar functional roles (Appendix S1). Finally, each dataset included (1) a sites-by-species abundance matrix; (2) a species-by-traits table ; (3) a sites-by-spatial coordinates table ;.
| Community similarity When estimating community similarities, we used both occurrence and abundance data, because occurrences are informative about the drivers and patterns of communities along geographical gradients, whereas abundances inform patterns along environmental gradients well  (Declerck et al. , 2011). The similarity in species composition between two communities (hereafter, taxonomic similarity) was estimated with the function beta in the package BAT v. 2. 7. 0  (Cardoso et al. , 2020). For the similarity in trait composition (hereafter, functional similarity), we first represented the ecological niche spaces of species as n-dimensional hypervolumes  (Hutchinson, 1957)  sensu  Blonder (2018). We used probabilistic hypervolumes based on the Gaussian kernel density estimator instead of other widely used methods (e.
Finally, we estimated the amount of overlap between two hypervolumes, in addition to the unique area of each community, using the function kernel. beta of BAT that builds on hypervolume_set of (1) S jk = 1 - b + c 2a + b + c F I G U R E 3 The analytical framework described in a stepwise manner: (a-c) hierarchical description of the methods performed at dataset level, including the estimation of similarities and distance in addition to the distance decay models of each dataset; and (d) description of the tests performed after the compilation of the metrics from all datasets. (a) The four objects used in the analyses: a species-by-traits table, a sites-by-species matrix, a sites-by-coordinates table and a sites-by-environment table. (b) The calculation of taxonomic and functional similarities and of spatial and environmental distance.
In the first example, only species identities are considered, and because sites k and k do not share any species, community similarity (blue) equals zero. In the second example, the functional traits of species are considered, and community similarity (orange) is higher than zero. The third example shows how spatial distance was calculated as the geographical distance between pairs of sites using spatial coordinates. The fourth example illustrates how sites far from each other may show similar environmental conditions and therefore small environmental distance. Environmental distance was calculated as the Euclidean distance between pairs of sites considering the standardized environmental variables. (c) Illustration of the metrics extracted to study the distance decay across datasets. The strength of distance decay was measured from Mantel tests using Spearman correlations (Mantel r), and the rate of decay was measured as the slopes of generalized linear models following a quasibinomial family with a log link.
| Spatial and environmental distance For each dataset, spatial distance was calculated as the geographical distance (in kilometres) between the pairs of sites using the function earth. dist of the package fossil v. 0. 4. 0  (Vavrek, 2011)  (Figure  3b ). Environmental distance was calculated as the Euclidean distance between all the pairs of sites, considering the standardized environmental variables within each dataset (Figure  3b ), with the function vegdist of the package vegan v. 2. 5-6  (Oksanen et al. , 2019). From the original environmental variables in each dataset, we only kept the continuous variables with <5% missing values (for data curation, see Appendix S2). Given that the datasets contained different numbers and types of environmental variables, the values of environmental distance were context dependent and not very informative for comparison across datasets.
| Statistical analysis We tested our master hypothesis using two different approaches. Firstly, we investigated whether taxonomic or functional distance decay is stronger along spatial and environmental distance (H 1 ) by performing Student's paired t tests to compare Mantel r drawn from taxonomic and functional similarity for each dataset, considering both spatial and environmental distance (Figure  3d ). Secondly, we generated a null distribution of functional similarity values by randomizing the names of the species across the trait table 999 times. At each iteration, the functional similarities were calculated and regressed against spatial and environmental distance. The slopes of these relationships were used to obtain a null distribution of slopes under the assumption that the rate of functional decay is random given the rate of taxonomic decay.
Deviations from null distribution were tested using standardized effect sizes (SES;  Gotelli & Graves, 1996) ; SES values >1. 96 indicate that functional similarity decays faster than expected given taxonomic decay, whereas SES values <-1. 96 indicate that functional similarity decays slower than expected given taxonomic decay  (Swenson et al. , 2011). We also investigated the ecological and geographical factors driving the rate of the distance decay across datasets. Each dataset was characterized with respect to: (1) latitude, recorded as the absolute mean value of all the sites of the dataset; (2) spatial extent, expressed as the largest pairwise distance (in kilometres) between study sites; (3) realm, classified into freshwater, marine and terrestrial environments; (4) body size information drawn from literature  (Hillebrand, 2004; Peters, 1983)  For body sizes, we note that although the size range within the biotic group can be large (up to five orders of magnitude), it is small compared with the overall variation obtained across organism groups (12 orders of magnitude).
For more details on body size approximations, see the papers by  Hillebrand (2004)  and  Drakare et al. (2005). The taxonomic γ-diversity was included to study whether there is a typical positive relationship between γ-diversity (taxonomic and functional) and β-diversity  (Kraft et al. , 2011; Lamanna et al. , 2014). Functional γ-diversity was estimated using the function hypervolume_set of the package hypervolume v. 2. 0. 12  (Blonder & Harris, 2019). Hypervolumes are expressed in units of SDs to the power of the number of trait dimensions used (i. e. , three). The number of study sites and the number of environmental variables for each dataset were included to explore their potential effect on distance decay. Finally, we used boosted regression trees (BRTs) to test the effects of latitude (H 2 ), spatial extent (H 3 ) and realm (H 4 ) on the rate of taxonomic and functional distance decay along spatial and environmental distance across the datasets.
The BRT parameters were selected to amplify the deviance explained by the model. We tested interaction depths of 0. 1, 0. 01 and 0. 001, and learning rates between two and five. The best models were the ones with a learning rate of five and interaction depth of 0. 001. Given that the datasets in this study have not always followed the same sampling methodology and show different functional traits and environmental variables, we fitted the BRT models following a Laplace distribution of the errors to reduce the absolute error loss from the variation among datasets. We included taxonomic and functional γ-diversity, number of sites and number of environmental variables in the dataset as predictor variables for controlling the heterogeneity across datasets within the model (Figure  3d ). The BRT models were fitted using the function gbm.
step of the package dismo v. 1. 1-4 (Hijmans et al. , 2017). Given that some predictors could show cross-information (e. g. , marine ecosystems have smaller organisms than terrestrial systems in our datasets), we tested whether there were significant interactions between predictors in BRTs using the functions gbm. interaction. For understanding how gbm. interaction works and for more in-depth details about BRTs, we refer to the (Appendix S2 and references therein). Additionally, we performed sensitivity analysis to ensure that the patterns detected were not an artefact of sample size. In the sensitivity analysis, models were refitted using subsampled data with 90, 70 and 50% of the full observations. We partitioned the similarities into replacement and richness difference components following the methodology described in the (Appendix S2).
| Strength of the distance decay The distance decays showed a wide range of shapes, from very steep decays to almost flat relationships (Figure  4 ). The average Mantel r using occurrence data along spatial distance for taxonomic similarities was. 254 (SD ±0. 197) and. 115 (SD ±0. 143) for functional similarities. Spatial distance decays of taxonomic similarities were significantly stronger than the distance decays of functional similarities when considering both occurrence (Figure  4a ; t = 13. 124, p <. 001, d. f. = 146) and abundance data (Appendix S3; Figure  S3. 3), supporting H 1a that spatial distance decay is stronger for taxonomic than functional similarities (Figure  4a ). In 31 datasets, the spatial distance decay of functional similarities was stronger than taxonomic similarities.
However, our results did not support H 1b , because the distance decay for taxonomic similarities (mean Mantel r =. 272, SD ±0. 176) was also, on average, stronger than for functional similarities (mean Mantel r =. 150, SD ±0. 144) along environmental distance, considering both occurrence (Figure  4b ; t = 10. 342, p <. 001, d. f. = 146) and abundance data (Appendix S3; Figure  S3. 3). Note, however, that 32 of 148 datasets had stronger distance decay of functional similarities than taxonomic similarities along environmental gradients.
| Rate of the distance decay The mean slope of the spatial distance decay was -0. 009 (SD ±0. 028) for taxonomic similarities and -0. 004 (SD ±0. 020) for functional similarities (Figure  4a ). Null models showed that only 13 datasets had a functional distance decay significantly different from expected given taxonomic decay, with three datasets having faster slopes and 10 having slower slopes (Figure  4a ). For environmental distance, the mean slope of the distance decay was -1. 077 (SD ±1. 066) for taxonomic similarities and -0. 355 (SD ±0. 031) for functional similarities (Figure  4b ). Null models along environmental distance showed that only 11 datasets had a functional distance decay significantly different from expected given the taxonomic decay, from which only one was slower (Figure  4b ).
Regarding the biotic groups, terrestrial plants had the steepest slopes along spatial distance for both taxonomic and functional similarities (Figure  5 ). Along environmental distance, corals had the steepest slopes along spatial distance, whereas foraminifera had the steepest slopes along environmental distance (Figure  5 ). Similar patterns were found for abundance-based similarities, except for the biotic groups, where aquatic plants had the steepest slopes along spatial distance (Appendix S3; Figure  S3. 4). Across datasets, BRT explained 35. 4% of the deviance of the slopes of the spatial distance decay for taxonomic similarities and 38. 3% for functional similarities using occurrence data. For the distance decay along environmental distance, BRT explained only 14. 4% of the deviance of the slopes of the decay of taxonomic similarities and 6.
6% for functional similarities. Spatial extent, latitude and γ-diversity contributed the most to the variation in slopes along either spatial or environmental distance using both occurrence-and abundance-based similarities (Figures  6a  and 7a ; Appendix S3; Figures S3. 5 and S3. 6). We found interactions for the BRT only on taxonomic similarities along environmental gradients. These were between: (1) taxonomic γ-diversity and body size (interaction size = 5. 09); and (2) spatial extent and latitude (interaction size = 3. 79). These are probably related to the higher number of species included in the datasets containing small biotic groups and the fact that larger datasets had a mean latitude near the equator. There was no evident effect of sample size on the main patterns according to the sensitivity analysis (Appendix S2; Figures S2.
| Latitudinal patterns The slopes of spatial distance decay of both taxonomic and functional similarities were steepest in datasets centred at c. 35-45°, providing only partial support for H 2a that distance decay was flatter at high latitudes (Figure  6a ). Note that spatial distance decay decreased sharply towards the poles. The slopes of environmental distance decay were flattest in the datasets at c. 50° (Figure  6b ). However, note that functional distance decay increased towards the poles, providing partial support to hypothesis H 2b. Similar patterns were found for abundance-based similarities (Appendix S3; Figure  S3. 5).
| Spatial extent The distance decay of taxonomic and functional similarities was flatter in the datasets that covered a larger spatial extent for both occurrence (Figure  6a ) and abundance data (Appendix S3; Figure  S3. 5a), supporting hypothesis H 3a that distance decay becomes flatter with increasing spatial extent. For environmental distance, distance decay was steeper in the datasets that covered larger spatial extents only for taxonomic similarities, but functional distance decay did not vary with extent. Thus, our results agreed, in part, with H 3b that distance decay would become steeper with larger spatial extent.
| Organismal variables and dataset features Organisms relying on seed dispersal had steeper slopes along spatial and environmental distance than other dispersal types, but the overall importance of dispersal mode was low (Figure  7b ). The slopes of both spatial and environmental distance decays were steeper for largerbodied organisms in taxonomic and functional similarities (Figure  7a, b ). Taxonomic γ-diversity had a U-shaped relationship with slopes for distance decay along spatial and environmental distance (Figure  7b ). Slopes of distance decay had an overall flattening trend towards higher functional γ-diversity for both spatial and environmental distance (Figure  7a, b ). Generally, taxonomic slopes were steeper in the datasets where the number of study sites was higher (Figure  7a ), whereas the opposite was true for functional slopes.
, 2016). Some morphological or morphometric traits are informative when exploring geographical patterns in functional composition  (Soininen et al. , 2016) ; for example, seed mass and wood density explained the variability of tree communities along broad spatial gradients better than species identity alone  (Siefert et al. , 2013). The type of dispersal is also an important trait to include when assessing community-level patterns along spatial gradients  (Bie et al. , 2012). Unsurprisingly, we found that the datasets with larger spatial extent and species pool size were more likely to have a stronger distance decay of taxonomic than functional similarities (Appendix S5; Table  S5. 1). We argue that when the study extent is large it might cross several species pools, and it is more likely that species occurrences are also affected by historical and dispersalrelated factors and not only by environmental preferences  (Soininen et al.
, 2016). Furthermore, we found that passive dispersers and datasets with higher functional γ-diversity were less likely to have stronger decay of taxonomic similarities than functional similarities. In our datasets, passive dispersers were microorganisms and, therefore, efficient dispersers with a good ability to reaching sites with suitable environmental conditions  (Bie et al. , 2012; Fontaneto, 2019). Thus, for these taxa, functional distance decay should be more informative than taxonomic distance decay. Regarding environmental gradients, functional distance decay was also weaker than taxonomic distance decay. Although counterintuitive, this relationship has been found previously  (Heino & Tolonen, 2017; da Silva & Hernández, 2015; Teittinen & Virta, 2021). For example,  Teittinen and Virta (2021)  observed stronger distance decay of taxonomic than functional similarities along environmental gradients, which they attributed to the greater number of species than functional traits in their data.
Also,  Heino and Tolonen (2017)  found similar results for macroinvertebrate communities of boreal lakes and related it to the trait resolution, which could probably be improved by the addition of several other physiological traits relevant for the organisms in question. Here, additional analysis showed that increasing spatial extent, species pool and the number of environmental variables significantly increased the probability of a dataset having stronger decay of taxonomic similarities compared with functional similarities (Appendix S5; Table  S5. 2). In fact, the ratio between taxonomic and functional decay depends on whether the species replaced from one community to another are a random subsample of functionally redundant species from the regional pool  (Swenson et al. , 2011). Also, species pool size and functional redundancy typically exhibit a positive correlation  (Cannicci et al.