This function calculates for each plot and year some values per hectare: number of tree species, number of trees, basal area and volume.

calc_dendro_plot(data_dendro_calc, data_deadwood, plotinfo)

Arguments

data_dendro_calc

dataframe on tree measures with variables plot_id, plottype, tree_measure_id, date_dendro, dbh_mm, height_m, species, alive_dead, decaystage, vol_tot_m3, basal_area_m2, period, old_id, year, subcircle, plotarea_ha,... (output of function calc_variables_tree_level())

data_deadwood

dataframe on logs with variables plot_id, plottype, date_dendro, species, decaystage, calc_volume_m3, period and year (output of function load_data_deadwood())

plotinfo

dataframe on surveyed plots with variables plot_id, plottype, forest_reserve, survey_trees, survey_deadw, period and year_dendro (output of function load_plotinfo())

Value

dataframe with columns plot, year, number_of_tree_species, number_of_trees_ha, basal_area_m2_ha, volume_m3_ha

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")

data_dendro <- load_data_dendrometry(path_to_fieldmapdb)
data_shoots <- load_data_shoots(path_to_fieldmapdb)
data_deadwood <- load_data_deadwood(path_to_fieldmapdb)
data_stems <- compose_stem_data(data_dendro, data_shoots)
# omit argument 'example_dataset = TRUE' below to use all height models
height_model <- load_height_models(example_dataset = TRUE)
data_stems_calc <- calc_variables_stem_level(data_stems, height_model)
data_dendro_calc <- calc_variables_tree_level(data_dendro, data_stems_calc)
plotinfo <- load_plotinfo(path_to_fieldmapdb)
#> Joining with `by = join_by(forest_reserve, plot_id, plottype, survey_trees)`
calc_dendro_plot(data_dendro_calc, data_deadwood, plotinfo)
#> # A tibble: 17 × 16
#>    plottype plot_id  year period number_of_tree_species number_of_trees_ha
#>    <chr>      <int> <int>  <dbl>                  <int>              <dbl>
#>  1 CA         11000  1986      0                      2              0.558
#>  2 CA         11000  2000      1                      3              0.651
#>  3 CA         11000  2010      2                      3              0.558
#>  4 CA         11000  2020      3                      3              0.558
#>  5 CA         21000  2008      1                      4             28.6  
#>  6 CA         21000  2018      2                      3             26.5  
#>  7 CA        141100  2007      1                      2              8    
#>  8 CA        141100  2016      2                      2              4    
#>  9 CP           101  2002      1                      3            364.   
#> 10 CP           101  2012      2                      2            206.   
#> 11 CP           204  2000      1                      1             23.9  
#> 12 CP           204  2011      2                      1             23.9  
#> 13 CP          1005  2006      1                      1             42.4  
#> 14 CP          1005  2016      2                      1             42.4  
#> 15 CP          2006  2000      1                      1             10.6  
#> 16 CP          2006  2010      2                      1             10.6  
#> 17 CP          2006  2020      3                      1             10.6  
#> # ℹ 10 more variables: stem_number_ha <dbl>, basal_area_alive_m2_ha <dbl>,
#> #   basal_area_dead_m2_ha <dbl>, vol_alive_m3_ha <dbl>,
#> #   vol_dead_standing_m3_ha <dbl>, vol_bole_alive_m3_ha <dbl>,
#> #   vol_bole_dead_m3_ha <dbl>, vol_log_m3_ha <dbl>, vol_deadw_m3_ha <dbl>,
#> #   stems_per_tree <dbl>