This repo contains the scripts to model AGB using LiDAR data and write its scientific article, all made in R.
The repo contains three main folders:
This folder contains all the processing steps:
-
AGB_calc. Calculates AGB for each plot using BIOMASS package. This step includes searching for each specie's wood density in Zanne et al., 2009 and calculating AGB uncertainty.
-
AnalisislidR. Calculates LiDAR cloud point metrics using lidR package. This step includes creating a DTM from the cloud, normalize non-ground points and extract vertical profiles (Z) and intensity (I) metrics.
-
Fitting different models: 3.1. LM_models. Linear models. 3.2. RF_models. Random forest models. 3.3. XGB_modeks. XGBoost models.
-
CI_int_pred. Calculates de confidence intervals for the predictions made by the best model. This calculation is performed using a bootstrapped dataset.
-
AnalisislidR_AllROI. Calculates the three LiDAR metrics included in the best model in a raster with a pixel resolution of 25 m.
-
ROIAGB_pred. Makes the AGB prediction for the complete study area. This prediction is done based on the best model and using the LiDAR metrics generated for the complete study area (step 5).
-
Map. Creates maps of the study site and AGB prediction of the complete study area.
This folder contains all the files required to make a word document of the article, using RMarkdown and RStudio.
-
The main document is Manuscript_LiDARAGBCometa which contains the text and code for some figures and tables.
-
Library. Contains the bib library that is cited in the manuscript.
-
Template. Contains the template for the styles used to render the word document.
-
international-journal-of-digital-earth. Is the file that indicates how the references should be formatted.
-
Trackdown script to update files in Google Drive. This is a package that allows uploading an md and docx documents to drive.
- BD_Joni_lidR_24. AGB data used in this study.