<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="/v2/static/oai2.xsl"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate>2026-10-07T23:11:42Z</responseDate>
  <request identifier="oai:figshare.com:article/31450903" metadataPrefix="oai_dc" verb="GetRecord">https://api.figshare.com/v2/oai</request>
  <GetRecord>
    <record>
      <header>
        <identifier>oai:figshare.com:article/31450903</identifier>
        <datestamp>2026-10-01T12:46:39Z</datestamp>
        <setSpec>category_24235</setSpec>
        <setSpec>item_type_14</setSpec>
        <setSpec>month_year_10_2026</setSpec>
      </header>
      <metadata>
        <oai_dc:dc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
          <dc:title>Code and Data for "Thermal baselines and climate-space geometry mediate systematic terrestrial biodiversity responses to warming"</dc:title>
          <dc:creator>anonymity anonymity (6419120)</dc:creator>
          <dc:subject>Terrestrial ecology</dc:subject>
          <dc:subject>Climate change</dc:subject>
          <dc:description>&lt;p dir="ltr"&gt;# README: Reproducibility Code &amp; Data&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;&gt; **Title:** *Thermal baselines and climate-space geometry mediate systematic terrestrial biodiversity responses to warming*&lt;/p&gt;&lt;p dir="ltr"&gt;&gt; **Date:** March 2026&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;***&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;## 1. Overview&lt;/p&gt;&lt;p dir="ltr"&gt;This repository contains the full analytical pipeline for investigating how **climate-space geometry** (area and isolation) and **thermal baselines** modulate the response of terrestrial biodiversity to warming. The study utilizes 1,161 assemblage time series from the BioTIME 2.0 database.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;---&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;## 2. Directory Structure&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;### 📁 `Code/`&lt;/p&gt;&lt;p dir="ltr"&gt;All R scripts are prefixed with numbers to indicate the execution order.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;* **`01_Preprocess and rarefy data.R`**&lt;/p&gt;&lt;p dir="ltr"&gt;Processes raw BioTIME data, including: site screening, spatial gridding (hexagonal cells), sample-based rarefaction, and calculation of community metrics (Richness, Abundance, Evenness).&lt;/p&gt;&lt;p dir="ltr"&gt;* **`02_brmModel.R`**&lt;/p&gt;&lt;p dir="ltr"&gt;Constructs Bayesian hierarchical models using the `brms` package to model diversity slopes against temperature change.&lt;/p&gt;&lt;p dir="ltr"&gt;* **`03_Plotting_Figures.R`**&lt;/p&gt;&lt;p dir="ltr"&gt;A collection of scripts to generate all Main Text and Supplementary Figures.&lt;/p&gt;&lt;p dir="ltr"&gt;* **`FUNCTION calculate metrics.R`**&lt;/p&gt;&lt;p dir="ltr"&gt;A core utility script containing custom functions for community analysis, climatic data matching (CHELSA/CRU TS), and temperature change estimation.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;### 📁 `Data/`&lt;/p&gt;&lt;p dir="ltr"&gt;* **Input:** Raw BioTIME 2.0 records and climatic layers (CHELSA/CRU TS).&lt;/p&gt;&lt;p dir="ltr"&gt;* **Output:** Processed dataframes from Script 01 and fitted `.Rdata` model objects from Script 02.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;### 📁 `Figure/`&lt;/p&gt;&lt;p dir="ltr"&gt;* Output destination for all high-resolution plots generated by Script 03.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;---&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;## 3. Data Availability 🌐&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;**Biodiversity Data:**&lt;/p&gt;&lt;p dir="ltr"&gt;The raw records used in this study are available from the **BioTIME 2.0 database** at:&lt;/p&gt;&lt;p dir="ltr"&gt;👉 [https://doi.org/10.1111/geb.70003](https://doi.org/10.1111/geb.70003)&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;**Climate Data:**&lt;/p&gt;&lt;p dir="ltr"&gt;* **CHELSA:** [https://chelsa-climate.org/](https://chelsa-climate.org/)&lt;/p&gt;&lt;p dir="ltr"&gt;* **CRU TS:** [https://crudata.uea.ac.uk/cru/data/hrg/](https://crudata.uea.ac.uk/cru/data/hrg/)&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;**Analytical Code:**&lt;/p&gt;&lt;p dir="ltr"&gt;All processed datasets and custom R code are archived at **Figshare** (DOI: Pending).&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;---&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;## 4. Workflow (How to Reproduce)&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;To fully reproduce the findings, run the scripts in the following order:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;1. **Step 1:** Run `01_Preprocess and rarefy data.R`. It automatically sources `FUNCTION calculate metrics.R`.&lt;/p&gt;&lt;p dir="ltr"&gt;2. **Step 2:** Run `02_brmModel.R`. (Note: Fitting Bayesian models is computationally intensive; pre-fitted objects are provided in `/Data`).&lt;/p&gt;&lt;p dir="ltr"&gt;3. **Step 3:** Run the `03_...` series to output all figures directly to the `/Figure` folder.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;---&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;## 5. Software Requirements 🛠️&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;The analysis was performed in **R (version 4.2.2)**. The following libraries are required:&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;```r&lt;/p&gt;&lt;p dir="ltr"&gt;# Data Manipulation &amp; Stats&lt;/p&gt;&lt;p dir="ltr"&gt;library(tidyverse) # dplyr, ggplot2, tidyr&lt;/p&gt;&lt;p dir="ltr"&gt;library(data.table) # Fast data loading&lt;/p&gt;&lt;p dir="ltr"&gt;library(brms) # Bayesian modeling&lt;/p&gt;&lt;p dir="ltr"&gt;library(vegan) # Ecological metrics&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p dir="ltr"&gt;# Spatial &amp; Visualization&lt;/p&gt;&lt;p dir="ltr"&gt;library(dggridR) # Hexagonal gridding&lt;/p&gt;&lt;p dir="ltr"&gt;library(wesanderson) # Color palettes&lt;/p&gt;&lt;p dir="ltr"&gt;library(patchwork) # Multi-panel plots&lt;/p&gt;&lt;p dir="ltr"&gt;library(ggdist) # Visualizing distributions&lt;/p&gt;</dc:description>
          <dc:date>2026-10-01T12:46:39Z</dc:date>
          <dc:type>Text</dc:type>
          <dc:type>Conference contribution</dc:type>
          <dc:identifier>10.6084/m9.figshare.31450903.v1</dc:identifier>
          <dc:relation>https://figshare.com/articles/conference_contribution/Code_and_Data_for_Thermal_baselines_and_climate-space_geometry_mediate_systematic_terrestrial_biodiversity_responses_to_warming_/31450903</dc:relation>
          <dc:rights>CC BY 4.0</dc:rights>
        </oai_dc:dc>
      </metadata>
    </record>
  </GetRecord>
</OAI-PMH>
