Sovereign 8s.is mirror of standardgalactic/rice-analysis
  • BibTeX Style 76%
  • TeX 18%
  • R 6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nick Gauthier 308e540678 Remove Science extension and related files
Deleted the custom Science extension and its associated files, including configuration, LaTeX header, citation style, Lua filter, and bibliography style. Updated _quarto.yml and main.qmd to remove references to the extension, and added main.rmarkdown for migration or compatibility.
2025-12-04 18:36:35 -05:00
_extensions/nature Remove Science extension and related files 2025-12-04 18:36:35 -05:00
data/derived Create README.md 2025-12-04 18:04:40 -05:00
renv Add renv for R environment management 2025-08-29 14:02:48 -04:00
.gitignore Update .gitignore 2025-08-29 14:25:03 -04:00
.Rprofile Add data preprocessing and update manuscript config 2025-08-29 12:35:06 -04:00
_preprocessing.qmd Add data preprocessing and update manuscript config 2025-08-29 12:35:06 -04:00
_quarto.yml Remove Science extension and related files 2025-12-04 18:36:35 -05:00
_supplementary_materials.qmd Update data paths and add derived datasets 2025-08-29 12:59:53 -04:00
LICENSE Initial commit 2023-01-26 09:57:07 -05:00
main.qmd Remove Science extension and related files 2025-12-04 18:36:35 -05:00
main.rmarkdown Remove Science extension and related files 2025-12-04 18:36:35 -05:00
preprocessing.qmd Remove debugging plot and variable assignments 2025-12-04 18:16:16 -05:00
README.md Update README to include manuscript link 2025-08-29 14:56:20 -04:00
references.bib Add data preprocessing and update manuscript config 2025-08-29 12:35:06 -04:00
renv.lock Add renv for R environment management 2025-08-29 14:02:48 -04:00
rice.Rproj initial commit of niche analysis 2023-01-26 16:46:33 -05:00

Analysis Code for "Projected Warming Will Exceed the Long-Term Thermal Limits of Rice Cultivation"

This repository contains the R notebooks used for the analysis presented in the manuscript "Projected Warming Will Exceed the Long-Term Thermal Limits of Rice Cultivation."

Click here for a fully rendered version of the manuscript.

Repository Structure

Main Analysis: main.qmd

The main notebook contains:

  • Complete manuscript text with embedded analysis
  • All main and supplementary figures and tables
  • Online methods section
  • This is the primary file to run - it reproduces all results using preprocessed data included in the repository

Data Preprocessing: preprocessing.qmd

The preprocessing notebook is provided for reference and transparency but is not intended to be run as it requires:

  • Hundreds of GB of raw climate data (CHELSA-TraCE21k, CMIP6 ensembles)
  • Access to external data repositories and cloud storage
  • Significant computational resources and time

All necessary intermediate datasets are provided in data/derived/ for the main analysis.

Genetic Analysis

Code for the genetic offset analysis is available at this separate repository.

System Requirements

Software Dependencies

  • R (version 4.3.3 and above)
  • RStudio (recommended for working with Quarto notebooks)
  • See the relevant notebooks for information on the specific R packages and versions employed.

Operating Systems

  • Tested on macOS Sonoma, but should work on Windows and Linux systems as well.

Hardware

  • No special hardware required - the main analysis can be reproduced on a standard laptop computer
  • The preprocessing workflow (not included for reproduction) required high-performance computing resources to handle hundreds of GB of climate data

Installation Guide

Prerequisites

Ensure that you have R and RStudio installed on your machine. You can download them from:

Installation Steps

  1. Clone this repository to your local machine using:
    git clone https://github.com/nick-gauthier/rice
    
  2. Open RStudio and select the rice.rproj file from this folder.

Typical Installation Time

Installation time is primarily the time taken to install R and RStudio, which typically takes about 5-10 minutes depending on your internet connection.

Instructions for Use

To Reproduce the Main Analysis

  1. Open the main.qmd file in RStudio
  2. Install required R packages (they will be loaded automatically when you run the notebook)
  3. Click the "Render" button in RStudio to generate the complete manuscript with embedded figures and analysis

Expected Output

  • A complete HTML/PDF manuscript with all computational results, figures, and tables
  • All main text figures (1-6) and supplementary figures (S1-S9)
  • All tables including supplementary tables

Expected Time to Run

  • Approximately 5-10 minutes to reproduce the complete analysis and generate all figures
  • No large data downloads required - all preprocessed data is included in the repository

Note on Preprocessing

  • Do not attempt to run preprocessing.qmd - it requires access to hundreds of GB of external climate datasets
  • This file is provided for methodological transparency and to document the data processing pipeline
  • All outputs from preprocessing are already provided in data/derived/

For any issues or further inquiries, please open an issue in this repository.