DOI: 10.5061/dryad.g1jwstr1q
title: Data and code from: River network connectivity reductions dominate declines in the richness of plateau fish species under climate change in the upper Yangtze River Basin

description: Anthropogenic climate change and disrupted river network connectivity are
 major factors affecting freshwater fish richness. However, the
 distribution patterns of this parameter under the combined influence of
 climate change and reduced river connectivity resulting from hydroelectric
 development remain unclear. Here, we projected shifts in the richness of
 Schizothoracinae fish species, the most dominant and economically
 significant type of fish on and around the Qinghai‒Tibet Plateau. Stacked
 species distribution modeling and predictions were explored to simulate
 the range shifts of twenty species in the upper Yangtze River Basin under
 the impacts of connectivity and climate changes. The results revealed that
 river connectivity reduction dominated the richness shifts and loss in
 Schizothoracinae fish species. Higher-quality fish habitats are more
 susceptible to the impacts of connectivity reduction. Although the
 connectivity reduction caused by dam construction is associated with a
 slight increase in fish richness in the source region of the basin, it is
 primarily responsible for the widespread decrease in fish richness under
 future climate change scenarios. In the 2050s and 2090s under the two
 shared economic pathway scenarios, future climate change is predicted to
 enhance the positive impacts of river connectivity changes on fish habitat
 in the middle to high latitude regions of upper basins but worsen their
 negative impacts in other regions. Our study highlights the dominant role
 of river connectivity in influencing freshwater fish richness in the
 context of climate change, thereby highlighting the importance of
 connectivity restoration in global freshwater biodiversity conservation
 and water resource management.
description: # Data and code from: River network connectivity reductions dominate
 declines in the richness of plateau fish species under climate change in
 the upper Yangtze River Basin
 [https://doi.org/10.5061/dryad.g1jwstr1q](https://doi.org/10.5061/dryad.g1jwstr1q) ## Description of the data and file structure The dataset includes the not publicly accessible environmental factors, occurrence data and all the code needed to establish and run the Species Distribution Models. Readers can reproduce our work based on these data. ### Files #### File: data\_upload.zip 1. Occurrences.csv It contains the latitude and longitude coordinates of the 20 fish species in this study from 2001 to 2020, which can be directly read by R using "read.csv" function, which does not depend on any package. The coordinate system used is WGS1984  and geographic coordinates in this dataset have already been generalized to a grid. 2. River_Network_Connectivity_Before_2000.tif River network connectivity data for the upper Yangtze River basin before 2000 that can be directly read by R using function “brick” of the "Raster" package. It can be visualized using Arcmap 10.8.  Its values range from 0 to 100, with higher values indicating better connectivity. 3. River_Network_Connectivity_After_2000.tif River network connectivity data for the upper Yangtze River basin after 2000 that can be directly read by R using function “brick” of the "Raster" package. It can be visualized using Arcmap 10.8. Its values range from 0 to 100, with higher values indicating better connectivity. 4. UpperYangtz_RiverOrder.tif River order data  for the upper Yangtze River basin that can be directly read by R using function “brick” of the "Raster" package. It can be visualized using Arcmap 10.8. Its values range from integer 1 to 5, with river rank decreasing sequentially from 1 to 5. #### File: code for R.zip 1. 1_Data_prep.R It includes the processing code used in the article to generate modeling factors, such as resampling, clipping, and generating multi-layer raster files. 2. 2_Core_function.R It includes the author's self-designed batch processing functions for modelling and projection species habitat distribution for 20 fish species. 3. 3_Modeling.R It includes specific scripts for reading occurrence data and environmental variables, as well as for running species distribution models. 4. Drawing_for \_ST.R It includes post-processing code for the model outputs, involving classification and transformation to facilitate visualization in ArcGIS. 5. HCP_cal&drawing.R It includes code for calculating habitat colonization potential and classifying the results, also aimed at facilitating visualization. ## Sharing/Access information It can be used in open-access publications and it is licensed under CC0. ## Code/software "code for R.zip" folder contains the code needed for running the Species Distribution Models. You can reproduce our work by sequentially running "1_Data_prep," "2_Core_function," and "3_Modeling_and_future_projection" on the R platform. Note that R is not entirely independent of local setup; you’ll need to prepare the necessary local packages and source files in advance. However, as long as you follow the requirements specified in the code, it should run smoothly.