Reads in all the tables needed for carbon estimation and population scaling and joins them into a single table. Then, some additional data cleaning steps are performed.
Creates unique tree and plot identifiers (
tree_IDandplot_ID, respectively).Fills in missing values for
ACTUALHTwith values fromHTto prepare for interpolation.Overwrites
SPCDwith whatever the last value ofSPCDis for each tree (to handle trees that changeSPCD).Fills a tree's
MORTYRcolumn so every row contains the recorded mortality year.Filters to only include inventories that came after the start of the annual inventory in each state.
Arguments
- db
A list of tables produced by
fia_load().
Examples
db <- fia_load("RI", dir = system.file("exdata", package = "forestTIME"))
data_tidy <- fia_tidy(db)
#> ℹ Wrangling data
#> ✔ Wrangling data [410ms]
#>