Data and code for Community structure and range shifts in Arctic marine fish under climate change

Data and code for the paper published in Ecography: Community structure and range shifts in Arctic marine fish under climate change
Abstract: 
Arctic marine ecosystems are rapidly transforming due to climate change. Warming temperatures and shrinking sea ice are enabling boreal fish to expand northward, possibly disturbing cold-adapted Arctic species assemblages. Species range shifts have been documented in the Bering and Barents Seas, raising concerns about ecosystem restructuring. Range shifts are especially difficult to detect in the Arctic due to sparse and inconsistent data. Here, we studied fish composition from eDNA water samples taken in East Greenland, Svalbard, the Barents Sea, and the Kara Sea during the TOPtoTOP and Arctic Century expeditions. We examined the environmental drivers of fish community structure using global dissimilarity models. We calculated the decadal rate of temperature change to identify the fastest-changing areas. We compared fish detections from eDNA with published historical records for the Kara Sea to assess possible range expansions. We found that temperature was the main factor influencing the taxa turnover of fish communities, with Gadidae and Liparis sp. driving the greatest compositional differences. Over the past 30 years, temperatures increased by 0.2 to 0.6°C per decade at our study sites, with the highest increases in western Svalbard and the lowest in the eastern Kara Sea. Despite the apparent dependence on temperature, we identified only one species detected outside its known latitudinal range, and five species in the Kara Sea with recent occurrences or representing an extended distribution. Our study suggests that temperature, the main driver of fish community assembly, is increasing rapidly in the Arctic, and a few species have likely already shifted recently, or at least their detections are new in some areas. While these detections cannot be definitively linked to range shifts, our results highlight the need to improve monitoring of high-latitude fish communities to detect and predict future ecosystem changes.
Article:
Marques, V., Fopp, F., Jaquier, M., Ellingsen, K. E., Yoccoz, N., Jucker, M., ...Pellissier, L. (2025). Community structure and range shifts in Arctic marine fish under climate change. Ecography, e8014. doi: 10.1002/ecog.08014
Data:
The resource contains a zip file with the entire project structure. 
Data README: 
 Intro
This repo presents data and code associated with the paper "Community structure and range shifts in Arctic marine fish under climate change" published in Ecography
 Usage
Launch the `main.R` script to reproduce the entire analysis.  
It executes code blocks to create the data necessary for the analysis and then creates the figures.  
💣 attention, total size is expected ~20 Go and the script will query the CMEMS database to fetch environmental data
 Tools
To make the scripts run, you need R, R packages (see session info below), python3, and the copernicusmarine python tool (https://pypi.org/project/copernicusmarine/). 
 SessionInfo
```
sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS 15.5
Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/Zurich
tzcode source: internal
attached base packages:
[1] stats     graphics  grDevices
[4] utils     datasets  methods  
[7] base     
other attached packages:
 [1] lwgeom_0.2-14      
 [2] metR_0.15.0        
 [3] ggtext_0.1.2       
 [4] scico_1.5.0        
 [5] ggnewscale_0.5.0   
 [6] colorspace_2.1-1   
 [7] climetrics_1.0-15  
 [8] rts_1.1-14         
 [9] xts_0.14.0         
[10] zoo_1.8-12         
[11] ggpubr_0.6.0       
[12] adespatial_0.3-23  
[13] ggspatial_1.1.9    
[14] colorplaner_0.1.4  
[15] ape_5.8            
[16] factoextra_1.0.7   
[17] corrgram_1.14      
[18] FactoMineR_2.11    
[19] betapart_1.6       
[20] gdm_1.5.0-9.1      
[21] terra_1.7-78       
[22] rnaturalearth_1.0.1
[23] ggrepel_0.9.5      
[24] vegan_2.6-6.1      
[25] lattice_0.22-6     
[26] permute_0.9-7      
[27] cowplot_1.1.3      
[28] tidyterra_0.6.1    
[29] sf_1.0-16          
[30] egg_0.4.5          
[31] gridExtra_2.3      
[32] patchwork_1.2.0    
[33] viridis_0.6.5      
[34] viridisLite_0.4.2  
[35] mgcv_1.9-1         
[36] nlme_3.1-165       
[37] MBA_0.1-0          
[38] reshape2_1.4.4     
[39] conflicted_1.2.0   
[40] lubridate_1.9.3    
[41] forcats_1.0.0      
[42] stringr_1.5.1      
[43] dplyr_1.1.4        
[44] purrr_1.0.2        
[45] readr_2.1.5        
[46] tidyr_1.3.1        
[47] tibble_3.2.1       
[48] ggplot2_3.5.1      
[49] tidyverse_2.0.0    
[50] devtools_2.4.5     
[51] usethis_2.2.3      
loaded via a namespace (and not attached):
  [1] splines_4.4.0                
  [2] later_1.3.2                  
  [3] bitops_1.0-7                 
  [4] minpack.lm_1.2-4             
  [5] XML_3.99-0.16.1              
  [6] lifecycle_1.0.4              
  [7] rstatix_0.7.2                
  [8] doParallel_1.0.17            
  [9] MASS_7.3-60.2                
 [10] flashClust_1.01-2            
 [11] backports_1.5.0              
 [12] magrittr_2.0.3               
 [13] rmarkdown_2.27               
 [14] yaml_2.3.8                   
 [15] remotes_2.5.0                
 [16] httpuv_1.6.15                
 [17] sp_2.1-4                     
 [18] sessioninfo_1.2.2            
 [19] pkgbuild_1.4.4               
 [20] mapproj_1.2.11               
 [21] pbapply_1.7-2                
 [22] DBI_1.2.3                    
 [23] RColorBrewer_1.1-3           
 [24] ade4_1.7-22                  
 [25] maps_3.4.2                   
 [26] abind_1.4-5                  
 [27] pkgload_1.3.4                
 [28] RCurl_1.98-1.14              
 [29] itertools_0.1-3              
 [30] yaImpute_1.0-34              
 [31] rcdd_1.6                     
 [32] units_0.8-5                  
 [33] adegenet_2.1.10              
 [34] codetools_0.2-20             
 [35] xml2_1.3.6                   
 [36] adephylo_1.1-16              
 [37] DT_0.33                      
 [38] tidyselect_1.2.1             
 [39] RNeXML_2.4.11                
 [40] raster_3.6-26                
 [41] farver_2.1.2                 
 [42] jsonlite_1.8.9               
 [43] e1071_1.7-14                 
 [44] phylobase_0.8.12             
 [45] ellipsis_0.3.2               
 [46] iterators_1.0.14             
 [47] emmeans_1.10.4               
 [48] systemfonts_1.1.0            
 [49] foreach_1.5.2                
 [50] progress_1.2.3               
 [51] tools_4.4.0                  
 [52] ragg_1.3.2                   
 [53] snow_0.4-4                   
 [54] Rcpp_1.0.13                  
 [55] glue_1.8.0                   
 [56] xfun_0.44                    
 [57] withr_3.0.0                  
 [58] fastmap_1.2.0                
 [59] boot_1.3-30                  
 [60] latticeExtra_0.6-30          
 [61] fansi_1.0.6                  
 [62] spData_2.3.1                 
 [63] digest_0.6.35                
 [64] timechange_0.3.0             
 [65] R6_2.5.1                     
 [66] mime_0.12                    
 [67] estimability_1.5.1           
 [68] wk_0.9.1                     
 [69] textshaping_0.4.0            
 [70] jpeg_0.1-10                  
 [71] utf8_1.2.4                   
 [72] generics_0.1.3               
 [73] data.table_1.15.4            
 [74] class_7.3-22                 
 [75] prettyunits_1.2.0            
 [76] httr_1.4.7                   
 [77] htmlwidgets_1.6.4            
 [78] scatterplot3d_0.3-44         
 [79] spdep_1.3-5                  
 [80] pkgconfig_2.0.3              
 [81] gtable_0.3.5                 
 [82] picante_1.8.2                
 [83] adegraphics_1.0-21           
 [84] htmltools_0.5.8.1            
 [85] carData_3.0-5                
 [86] profvis_0.3.8                
 [87] multcompView_0.1-10          
 [88] scales_1.3.0                 
 [89] leaps_3.2                    
 [90] png_0.1-8                    
 [91] doSNOW_1.0.20                
 [92] geometry_0.4.7               
 [93] rnaturalearthhires_1.0.0.9000
 [94] knitr_1.47                   
 [95] rstudioapi_0.16.0            
 [96] rncl_0.8.7                   
 [97] uuid_1.2-0                   
 [98] tzdb_0.4.0                   
 [99] checkmate_2.3.1              
[100] coda_0.19-4.1                
[101] magic_1.6-1                  
[102] proxy_0.4-27                 
[103] cachem_1.1.0                 
[104] KernSmooth_2.23-24           
[105] parallel_4.4.0               
[106] miniUI_0.1.1.1               
[107] s2_1.1.6                     
[108] pillar_1.9.0                 
[109] grid_4.4.0                   
[110] vctrs_0.6.5                  
[111] urlchecker_1.0.1             
[112] promises_1.3.0               
[113] car_3.1-2                    
[114] xtable_1.8-4                 
[115] cluster_2.1.6                
[116] evaluate_0.24.0              
[117] mvtnorm_1.2-5                
[118] cli_3.6.3                    
[119] compiler_4.4.0               
[120] rlang_1.1.4                  
[121] crayon_1.5.2                 
[122] ggsignif_0.6.4               
[123] labeling_0.4.3               
[124] interp_1.1-6                 
[125] classInt_0.4-10              
[126] plyr_1.8.9                   
[127] fs_1.6.4                     
[128] stringi_1.8.4                
[129] deldir_2.0-4                 
[130] munsell_0.5.1                
[131] Matrix_1.7-0                 
[132] hms_1.1.3                    
[133] seqinr_4.2-36                
[134] shiny_1.8.1.1                
[135] gridtext_0.1.5               
[136] igraph_2.0.3                 
[137] broom_1.0.6                  
[138] memoise_2.0.1                
[139] fastmatch_1.1-4      
```
 Data content and reproducibility
Uncleaned raw table out of the bioinformatics pipeline can be found concatenated in `outputs/table_raw_before_cleaning.csv`, yet we caution readers to properly read the cleaning scripts should they wish to reproduce our analysis and this file is presently uncleaned.

Tags: arctic, climate-change, community-structure, environmental-dna, fish