This function calculates for each plot, tree species, year and diameter class some values per hectare: number of stems, basal area and volume of standing trees (for coppice based on data on shoot level), and volume of logs (= lying deadwood).

calc_diam_plot_species(data_stems_calc, data_deadwood, plotinfo)

Arguments

data_stems_calc

dataframe on stem level measurements with variables plot_id, plottype, tree_measure_id, date_dendro, dbh_mm, height_m, species, alive_dead, decaystage, period, year, subcircle, plotarea_ha,... (output of function calc_variables_stem_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, tree_species, dbh_class_5cm, 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_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_deadwood <- load_data_deadwood(path_to_fieldmapdb)
plotinfo <- load_plotinfo(path_to_fieldmapdb)
#> Joining with `by = join_by(forest_reserve, plot_id, plottype, survey_trees)`
calc_diam_plot_species(data_stems_calc, data_deadwood, plotinfo)
#> # A tibble: 158 × 15
#>    plottype plot_id  year period species dbh_class_5cm stem_number_alive_ha
#>    <chr>      <int> <int>  <dbl>   <dbl> <fct>                        <dbl>
#>  1 CA         11000  1986      0       7 65 - 70 cm                  0.0930
#>  2 CA         11000  1986      0       7 80 - 85 cm                  0.0930
#>  3 CA         11000  1986      0       7 85 - 90 cm                  0.0930
#>  4 CA         11000  1986      0      87 50 - 55 cm                  0.0930
#>  5 CA         11000  1986      0      87 60 - 65 cm                  0.0930
#>  6 CA         11000  1986      0      87 75 - 80 cm                  0.0930
#>  7 CA         11000  2000      1       7 75 - 80 cm                  0.0930
#>  8 CA         11000  2000      1       7 85 - 90 cm                  0.0930
#>  9 CA         11000  2000      1       7 95 - 100 cm                 0.0930
#> 10 CA         11000  2000      1      16 30 - 35 cm                  0.0930
#> # ℹ 148 more rows
#> # ℹ 8 more variables: stem_number_dead_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>