Skip to content

jmzobitz/BES-manuscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

246 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository for manuscript

"neonSoilFlux: An R Package for Continuous Sensor-Based Estimation of Soil CO2 Fluxes"

Directory structure:

  • data/raw: collected field data and neonSoilFlux generated data files
  • data/derived: derived data files (.Rda) from running all the scripts 01 - 04 in R/process
  • figures: output figures generated (along with other associated figure files for the manuscript).
  • R/functions: common functions used across all processing files
  • R/process: structured processing files to generate manuscript output. This directory has the convention that the structure for .R files:
    • 01-04 files are processing files that generate derived data files for data/derived
    • f denotes figure, t denotes table, sf supplementary figure
    • the number corresponds to the figure or table number in the manuscript
    • the text following corresponds to the name of the figure or table generated in figures

Required R libraries

The required R libraries and their versions (including specific version of the neonSoilFlux package used) are listed in the renv.lock file for use with the renv package. To install the required R packages, run the following commands in R in the cloned repository directory:

install.packages("renv")
renv::restore()

Building the Manuscript

Using the Makefile (Recommended)

A Makefile is provided to automate the entire workflow from data processing to PDF generation. This is the recommended approach for building the manuscript.

Prerequisites:

  • R with required packages (see note about renv above)
  • Quarto for PDF rendering
  • LaTeX for PDF generation

Quick Start:

# Build both main manuscript and supplemental PDFs
make

# Build only the main manuscript
make main

# Build only the supplemental material
make supp

# Clean all generated files
make clean

# Clean all generated files as well as all downloaded NEON data and processed flux files
make deep-clean

# Get help on all available targets (including other not listed here in the README)
make help

NOTE: All of the individually downloaded NEON environmental sensor and processed flux files for individual site-months from neonSoilFlux are included in data/raw/flux-data. We do not include the aggregated .Rda file (data/derived/all-year-flux-results.Rda) because it is too large for GitHub. However, this file is easily generated by sourcing the following file: R/process/01-process-neonSoilFlux.R or using the makefile.