DOI: 10.6084/m9.figshare.30962240.v1
title: Homogenization and differentiation of urban tree assemblages globally

description: READMEManuscript: Homogenization and differentiation of urban tree species globally;<br>Author: Xudong Yang, Jing Jin, Xinyi Liu, Frank A. La Sorte, Pengbo Yan, Myla Aronson, Jun Yang*<b>Folder Overview:</b> The folder contains three data tables and three R scripts, involving the raw species occurrence records used for βsim analysis among 71 cities and 39 ecoregion patches in this study, as well as the data analysis code. In addition, an extended dataset is provided, which includes 86 additional cities selected under relaxed completeness criteria. This dataset was used in the sensitivity analysis described in the manuscript to assess the robustness of the main results. If you have any questions regarding the code or datasets, please feel free to contact us, and we will do our utmost to assist you.###########################################Description of each table and R script<b>Raw_data:</b>(1) Table 1: Species occurrence records for 157 cities obtained from literature, including city tree lists verified by GlobalTreeSearch, city names, and corresponding ecoregion patch IDs.(2) Table 2: Integrated species occurrence records for 157 cities from literature and biodiversity databases, with verified tree lists, city names, and ecoregion patch IDs.(3) Table 3: Species occurrence records within 85 ecoregion patches, including ecoregion patch IDs and species names.<b>R scripts:</b>(1) Script 1 – <b>Ecoregiondatacreate.R</b>: Processing of tree species in ecoregions.(2) Script 2 – <b>Completenew.R</b>: Performs completeness analysis of species occurrence data across ecoregions.(3) Script 3 – <b>Dissimilarityanalysis_update</b><b>.R</b>: Calculates beta diversity (βsim), conducts statistical comparisons (e.g., Wilcoxon test, permutation test), and generates key visualizations used in the manuscript.<b>Data_Used_for_Analysis.zip:</b> This archive contains data generated by R Script 1 and R Script 2, which serve as direct inputs for analysis in Script 3.###########################################Code running instructionsOur data have been tested and validated to ensure full compatibility with the analysis workflow. The analyses in Script 1 and Script 2 involve the processing of a global tree species distribution dataset, which was compiled by integrating data from eight major biodiversity databases: GBIF, BIEN, Atlas of Living Australia, BioTime, RAINBIO, iDigBio, SpeciesLink, and BISON. This dataset exceeds 2 GB in size. Due to its volume, the full dataset is not included in this submission. Researchers who are interested in accessing the complete dataset may contact the corresponding author (Jun Yang) for academic use.For replication and peer review purposes, we provide a lightweight, clean version of the data in this archive. By running R Script 3 with this dataset (Data_Used_for_Analysis.zip), users can fully reproduce the results and figures presented in the manuscript.###########################################Code Function Overview (Pseudocode-style)**Script 1 (<code>Ecoregiondatacreate.R</code>)Load global tree species occurrence recordsFilter out urban and cropland data using land cover rasterAssign remaining records to ecoregionsExport non-urban species lists and spatial overlay results**Script 2 (<code>Completenew.R</code>)Load ecoregion-level species dataRun completeness analysis using the KnowBR packageSelect ecoregions with sufficient sampling coverageOutput cleaned dataset for dissimilarity analysis**Script 3 (<code>Dissimilarityanalysis_update.R</code>)Calculate βsim dissimilarity among urban pairs and ecoregion pairsCompute spatial distances between urban pairsPerform Wilcoxon tests and permutation testsVisualize dissimilarity patterns and export result tables###########################################System requirements**Programming Language: R (version ≥ 4.2.0)**Required Packages: <code>dplyr</code>, <code>ggplot2</code>, <code>ggpubr</code>, <code>ggpmisc</code>, <code>reshape2</code>, <code>terra</code>, <code>raster</code>, <code>vegan</code>, <code>betapart</code>, <code>mgcv</code>, <code>geosphere</code>, and <code>KnowBR</code>**Tested On: Windows 11**Hardware: Standard personal or office computer**Expected run time: Approximately 5 minutes using the simplified dataset