DOI: 10.5061/dryad.gxd2547vw
title: Data and code from: Determinants of species’ centrality in spatially-connected plant-frugivore networks

description: Species’ characteristics, such as their capacity to disperse great
 distances or to interact with many partners, may determine their ability
 to propagate impacts within and across communities. These spatial and
 interaction-related processes may have synergistic or opposing influences
 on a species’ ability to connect with others, but typical analyses of
 ecological networks may not be able to disentangle these effects. Here, we
 explored how the way in which a plant-frugivore metanetwork is described
 influences our perception of the species that can most impact others via
 direct and indirect effects. Specifically, we tested whether the ranking
 of bird species’ centrality and its relationship with species’
 characteristics depend on whether spatial distance and dispersal
 constraints are depicted in the metanetwork. To do this, we described a
 metanetwork comprising 29 local frugivory networks from the Atlantic
 Forest and Cerrado subrealm of Brazil using a gradient of spatial
 information, from simply aggregating interaction data across sites to
 using multilayer networks that connect populations from
 spatially-separated communities according to their spatial distance and
 species’ dispersal capacities. We found that rankings of bird species’
 centrality were, on average, not strongly influenced by incorporating
 spatial and dispersal effects (versus aggregating interaction data across
 sites), though the centrality of individual species changed considerably
 in some cases. Three species-level characteristics, degree of frugivory
 (which is associated with interaction generalism), area of habitat (which
 is associated with the number of local networks in which a bird species
 occurs), and body mass predicted bird species’ centrality consistently
 across the different approaches used to generate the metanetwork. Our
 findings indicate that key characteristics associated with spatial and
 interaction-related processes can determine the central role of species in
 spatially-connected interaction networks, irrespective of whether spatial
 and dispersal constraints are explicitly incorporated in the metanetwork.
description: # Data and code: Determinants of species’ centrality in
 spatially-connected plant-frugivore networks
 [https://doi.org/10.5061/dryad.gxd2547vw](https://doi.org/10.5061/dryad.gxd2547vw) The scripts and data presented here are part of the article "Determinants of species’ centrality in spatially-connected plant-frugivore networks" ## Description of dataframe files: #### dataframe\_scaled\_model (from 1 to 5): * *species*: Scientific name of the bird species * *type*: Categorical variable describing the type of metanetwork (based on the approach used to generate the metanetwork): * aggregated (aggregated/monolayer metanetwork) * homogeneous (homogeneous multilayer network with interlayer links = 0.5) * exponential (spatially-explicit multilayer network in which interlayer links are calculated using an exponential function) * dispersal (dispersal explicit-multilayer network) * dispersal_bird (dispersal-explicit multilayer network with only birds as interlayer links) * distance1 (spatially-explicit multilayer network with interlayer links calculated using eq.1 from Sup. information) * distance2 (spatially-explicit multilayer network with interlayer links calculated using eq.2 from Sup. information) * distance3 (spatially-explicit multilayer network with interlayer links calculated using eq.3 from Sup. information), * *degree_frugivory*: (Scaled) Degree of frugivory of the bird species * *area_habitat*: (Scaled) Area of habitat of the bird species (measured as number of suitable pixels within the species' range) * *range_size*: (Scaled) Total area of the mapped range of the species (km2) * *body_mass*: (Scaled) Body mass (g) of the species * *beak_width*: (Scaled) Width of the beak at the anterior edge of the nostrils (mm) * *centrality*: Katz centrality #### dataframe\_species: * *number_occ*: Number of occurrences in local network sites - *total_degree*: Number of partners in the metanetwork * *degree_frugivory*: Degree of frugivory of the bird species (from 0 to 100) - *area_habitat*: Area of habitat of the bird species (measured as number of suitable pixels within the species' range) - *range_size*: The total area of the mapped range of the species (km2) - *body_mass*: Body mass (g) of the bird species - *beak_width*: Width of the beak at the anterior edge of the nostrils (mm) - *hand_wing*: Hand-Wing index of the bird species #### local\_dataframe\_scaled: * *bird_species*:  Scientific name of the bird species * *net_id*: ID of the local network site * *area_habitat*: (Scaled) Area of habitat of the bird species (measured as number of suitable pixels within the species' range) * *range_size*: (Scaled) Total area of the mapped range of the species (km2) * *body_mass*: (Scaled) Body mass (g) of the bird species * *beak_width*: (Scaled) Width of the beak at the anterior edge of the nostrils (mm) * *hand_wing*: (Scaled) Hand-Wing index of the bird species * *degree_frugivory*: (Scaled) degree of frugivory of the bird species * *n_partners*: number of partners in the local network #### local\_level\_dataframe: * *bird_species*:  Scientific name of the bird species * *net_id*: ID of the local network site * *area_habitat*: Area of habitat of the bird species (measured as number of suitable pixels within the species' range) * *range_size*: Total area of the mapped range of the species (km2) * *body_mass*: Body mass (g) of the bird species * *beak_width*: Width of the beak at the anterior edge of the nostrils (mm) * *hand_wing*: Hand-Wing index of the bird species * *degree_frugivory*: Degree of frugivory of the bird species (from 0 to 100) * *n_partners*: Number of partners in the local network #### main\_dataframe * *Species*:  Scientific name of the bird species * *order_name*: Order of the species * *Family*: Family of the species * *Genus*: Genus of the species * *Total_suitable_pixels*: Number of suitable pixels within the species' range * *Range_Size*: The total area of the mapped range of the species (km2) * *Body_mass*: Body mass (g) of the bird species * *Beak_width*: Width of the beak at the anterior edge of the nostrils (mm) * *Hand_Wing*: Hand-Wing index of the bird species * *Degree_Frugivory*: Degree of frugivory of the bird species  (from 0 to 100) * *aggregated_traditional*: centrality values obtained using a traditional aggregated metanetwork (see Methods) * *monolayer*: centrality values obtained using a monolayer/aggregated metanetwork (see Sup. Information) * *multilayer_homogeneous_one*: centrality values obtained using a multilayer network with interlayer links = 1 (see Sup. Information) * *multilayer_dispersal*: centrality values obtained using a dispersal-explicit multilayer network * *multilayer_dispersal_birds_only*: centrality values obtained using a dispersal-explicit multilayer network with only birds as interlayer links * *multilayer_exponential*: centrality values obtained using a spatially-explicit multilayer network (exponential function) * *multilayer_spatial_functon1*: centrality values obtained using a spatially-explicit multilayer network (spatial function 1; see Sup. Information) * *multilayer_spatial_functon2*: centrality values obtained using a spatially-explicit multilayer network (spatial function 2; see Sup. Information) * *multilayer_spatial_functon3*: centrality values obtained using a spatially-explicit multilayer network (spatial function 3; see Sup. Information) * *multilayer_homogeneous_0.5*: centrality values obtained using a multilayer network with interlayer links = 0.5 ## Description of *edge\_list* files: These files describe the links within and across layers. All *edge_list*  files contain the same colunms: * *node.from*: Node (species) from - *layer.from*: Layer (network) from - *node.to*: Node (species) to - *layer.to*: Layer (network) to - *weight*: Weight (strength) of the link ## Description of network files: The "*networks*" and "*networks_quantitative*" R files contain interaction matrices with bird species as colunms and plant species as rows. Cell values describe interaction frequency (*networks_quantitative*) or whether an interaction occurred (1) or not (0) between a bird and a plant species (*networks*). The "*metanetwork*" R file contains the metanetwork square adjacency matrix.  #### metadata\_networks: * *net_id*: ID of the local network site * *long*: Longitude * *lat*: Latitude * *sampling_years*: Years when the network was sampled * *altitude_m_asl*: Altitude (measured as meters above sea level) * *interaction_frequency*: How interaction frequency was measured (note that all are 'visits' in this dataset) * *coverage*: Whether sampling coverage was complete or partial (note that all are 'complete' in this dataset) * *ecoregion_id*: ID of the ecoregion where the network was sampled * *ecoregion_name*: Name of the ecoregion where the network was sampled * *biome_id*: ID of the biome where the network was sampled * *biome_name*: Name of the biome where the network was sampled * *realm*: Name of the realm where the network was sampled * *locality*: Name of the locality where the network was sampled * *reference*: Original source of the network ## Description of *supra\_adj\_matrices* files: These R files contain the supra-adjacency matrices (see more details in the Main Text) ## Description of *plant\_height\_data*: This excel file contains the plant height data and sources: * *plant_species*: Scietific name of the plant species * *max_plant_height*: Maximum plant height (m) of the plant species * *source*: Name of the source  * *notes*: Additional notes * *reference*: Complete reference ## Description and Strucure of Folders, Subfolders and Files: **spatial_networks**: Main folder containing the scripts and datasets\ \|- *data: Folder containing the data necessary for running the analyses* \| |- dataframes: subfolder containing the dataframes with our predictor and response variables \| |- edge_lists: subfolder containing the edge lists \| |- networks: subfolder containing the plant-frugivore network data \| |- supra_adj_matrices: subfolder containing the supra-adjacency matrices \| |- plant_*height*_data: file containing the plant height data and sources \|- *00_functions.R: Code - Functions to be used in the supplementary analyses of the paper* \|- *01_centrality*_*multilayer*.R: *Code for calculating centrality values in the multilayer networks* \|- *02_centrality_metanetwork.R: Code for calculating centrality values in the aggregated (monolayer) metanetwork* \|- *03_rankings_centrality.R: Code for generating rankings of centrality* \|- *04_models_selection.R: Code for running the main models & model selection* \|- *05_models_traits.R: Code for performing correlations between traits and testing their effect on interaction generalism and ubiquitousness* \|- *06_sup_sampling_effects.R: Code for evaluating the effects of sampling effects on the reported patterns* \|- *07_sup_correlations_centrality.R: Code for performing correlations between centrality values from different representations of the metanetwork* ## Software R version 4.3.2 (2023-10-31 ucrt) Running under: Windows 10 x64 (build 19045) ``` attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] sf_1.0-15 sp_2.1-3 bipartite_2.19 sna_2.7-2 network_1.18.2 [6] statnet.common_4.9.0 vegan_2.6-4 lattice_0.21-9 permute_0.9-7 ecodist_2.1.3 [11] data.table_1.14.10 stringr_1.5.1 lmerTest_3.1-3 corrplot_0.92 Hmisc_5.1-1 [16] car_3.1-2 carData_3.0-5 MuMIn_1.47.5 lme4_1.1-35.1 cowplot_1.1.3 [21] ggplot2_3.5.1 centiserve_1.0.0 Matrix_1.6-5 muxViz_3.1 dplyr_1.1.4 [26] igraph_2.0.1 here_1.0.1 loaded via a namespace (and not attached): [1] tidyselect_1.2.0 viridisLite_0.4.2 fields_15.2 fastmap_1.1.1 digest_0.6.34 [6] rpart_4.1.21 dotCall64_1.1-1 lifecycle_1.0.4 cluster_2.1.4 magrittr_2.0.3 [11] compiler_4.3.2 rlang_1.1.3 tools_4.3.2 utf8_1.2.4 knitr_1.45 [16] htmlwidgets_1.6.4 classInt_0.4-10 KernSmooth_2.23-22 abind_1.4-5 withr_3.0.0 [21] foreign_0.8-85 numDeriv_2016.8-1.1 nnet_7.3-19 grid_4.3.2 rgl_1.2.8 [26] stats4_4.3.2 fansi_1.0.6 e1071_1.7-14 colorspace_2.1-0 scales_1.3.0 [31] MASS_7.3-60.0.1 cli_3.6.2 rmarkdown_2.28 generics_0.1.3 rstudioapi_0.15.0 [36] proxy_0.4-27 DBI_1.2.1 minqa_1.2.6 splines_4.3.2 maps_3.4.2 [41] parallel_4.3.2 base64enc_0.1-3 vctrs_0.6.5 boot_1.3-28.1 jsonlite_1.8.8 [46] Formula_1.2-5 htmlTable_2.4.2 units_0.8-5 glue_1.7.0 spam_2.10-0 [51] nloptr_2.0.3 stringi_1.8.3 gtable_0.3.4 munsell_0.5.0 tibble_3.2.1 [56] pillar_1.9.0 htmltools_0.5.7 R6_2.5.1 rprojroot_2.0.4 evaluate_0.23 [61] backports_1.4.1 class_7.3-22 Rcpp_1.0.12 coda_0.19-4.1 gridExtra_2.3 [66] nlme_3.1-163 checkmate_2.3.1 mgcv_1.9-0 xfun_0.41 pkgconfig_2.0.3 ``` ## Access information Network data was derived from the following source: * [https://datadryad.org/stash/dataset/doi:10.5061/dryad.mcvdnck4d](https://datadryad.org/stash/dataset/doi:10.5061/dryad.mcvdnck4d)