Skip to content

Supplementary code for "Late Miocene transformation of Mediterranean Sea biodiversity"

License

Notifications You must be signed in to change notification settings

NiklasHohmann/messinian_biodiv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

messinian_biodiv

DOI

Supplementary code for "Late Miocene transformation of Mediterranean Sea biodiversity"
Project webpage: REMARE project

Authors

Niklas Hohmann (creator and maintainer of repository)
Utrecht University
email: n.h.hohmann [at] uu.nl
Web page: www.uu.nl/staff/NHohmann
ORCID: 0000-0003-1559-1838

Konstantina Agiadi (principal investigator)
University of Vienna
email: konstantina.agiadi [at] univie.ac.at
Web page: sites.google.com/view/kagiadi
ORCID: 0000-0001-8073-559X

License

Apache 2.0, see LICENSE file for full text.

Requirements

Base R (version >= 4) and the RStudio IDE.

Reproducing Results

In the RStudio IDE, open the file messinian_biodiv.Rproj. This opens the RProject of the same name, and installs the renv package (if not already installed). Then, run

renv::restore()

in the console to install all dependencies required for the analysis. Next, run

source("code/download_data.R")

do download the database from Zenodo. Next, run

source("code/analysis.R")

to reproduce the results, which might take a few minutes. This will (1) produce all figures in the figs folder and (2) generate variables sr_change and eco_ind_median in your workspace that contain median values of species richness and ecological indices. To inspect them, use

sr_change
eco_ind_median

Details on how to produce the maps can be found in code/make_maps.R.

Repository Structure

  • code : folder with code
    • analysis.R : code for main analysis
    • helper_function.R : aux functions (select data from DB, rarefy species richness & other ecological indices)
    • download_data.R : script to download data from Zenodo
  • data : folder containing the Messinina Database. Contains initially only one file with coral groud assignment, will be filled with data downloaded from Zenodo.
  • figs : folder for figures. Initially all subfolders are empty, they will be filled after the code is run (see section Reproducing Results)
    • eco_timeslice_comp : figs of comparison of ecol indices
    • eco_timeslice_comp_regional : figs of comparison of ecol indices per region
    • sr_through_time : figs of species richness through time
    • sr_through_time_regional : figs of species richness through time per region
    • sr_through_time_regional_comparable : figs of species richness per region, subsampled to same sample size
  • renv : folder for renv package
  • .gitignore : untracked files
  • .Rprofile : R session info
  • LICENSE : Apache 2.0 license text
  • messinian_biodiv.RProj : Rproject file
  • README : README file
  • renv.lock : lockfile for renv package

Funding

This work was supported by the Austrian Science Fund (FWF) project “Late Miocene Mediterranean Marine Ecosystem Crisis” (2022–2026), Project no. V 986, DOI 10.55776/V986 (PI: K.Agiadi).