This function queries the given database to retrieve data on vegetation (ready for use in calculate_vegetation() function). year_main_survey refers to year of the main vegetation survey (source is table vegetation), while year refers to year of recording of that specific species (possibly different for spring flora; source is table herblayer)

load_data_herblayer(
  database,
  plottype = NA,
  forest_reserve = NA,
  processed = TRUE
)

Arguments

database

name of Fieldmap/Access database (with specific Fieldmap structure) including path

plottype

possibility to select only data for a certain plot type, e.g. 'CP' for Circular plot or 'CA' for Core area (the default NA means that data from all plots are retrieved)

forest_reserve

possibility to select only data for 1 forest reserve by giving the name of the forest reserve (the default NA means that data from all plots are retrieved)

processed

Should only processed and surveyed data be added? Defaults to TRUE (yes).

Value

Dataframe with vegetation data on the species level ('herb layer'), containing columns as species, coverage_id, browse_index_id, date_vegetation (= date of survey of specific species, different for spring flora and other flora in the same plot), year (= year of survey of specific species, possibly different for spring flora and other flora), ....

Examples

library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
  system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
load_data_herblayer(path_to_fieldmapdb)
#>      forest_reserve plot_id plottype subplot_id period year     date_vegetation
#> 1      Everzwijnbad     101       CP          1      1 2002 2002-05-30 00:00:00
#> 2      Everzwijnbad     101       CP          1      1 2002 2002-05-30 00:00:00
#> 3   Withoefse heide     204       CP          1      1 2003 2003-07-01 00:00:00
#> 4        Liedekerke    1005       CP          1      1 2006 2006-07-24 00:00:00
#> 5  Kersselaerspleyn    2006       CP          1      1 2001 2001-07-01 00:00:00
#> 6  Kersselaerspleyn   11000       CA     155511      1 2000 2000-08-01 00:00:00
#> 7  Kersselaerspleyn   11000       CA     155512      1 2000 2000-08-01 00:00:00
#> 8  Kersselaerspleyn   11000       CA     155513      1 2000 2000-08-01 00:00:00
#> 9            Harras   21000       CA         17      1 2009 2009-04-14 00:00:00
#> 10           Harras   21000       CA         18      1 2009 2009-04-14 00:00:00
#> 11           Harras   21000       CA         19      1 2009 2009-04-14 00:00:00
#> 12           Harras   21000       CA         20      1 2009 2009-04-14 00:00:00
#> 13           Harras   21000       CA         21      1 2009 2009-06-18 00:00:00
#> 14           Harras   21000       CA         21      1 2009 2009-04-14 00:00:00
#> 15           Harras   21000       CA         22      1 2009 2009-04-14 00:00:00
#> 16           Harras   21000       CA         23      1 2009 2009-04-14 00:00:00
#> 17           Harras   21000       CA         24      1 2009 2009-04-14 00:00:00
#> 18           Harras   21000       CA         25      1 2009 2009-04-14 00:00:00
#> 19           Harras   21000       CA         26      1 2009 2009-04-14 00:00:00
#> 20     Sevendonck A  141100       CA          1      1 2007 2007-06-18 00:00:00
#> 21     Sevendonck A  141100       CA          2      1 2007 2007-06-18 00:00:00
#> 22     Sevendonck A  141100       CA          3      1 2007 2007-06-18 00:00:00
#> 23     Everzwijnbad     101       CP          1      2 2013 2013-06-11 00:00:00
#> 24     Everzwijnbad     101       CP          1      2 2013 2013-05-17 00:00:00
#> 25       Liedekerke    1005       CP          1      2 2016 2016-06-17 00:00:00
#> 26 Kersselaerspleyn    2006       CP          1      2 2011 2011-05-27 00:00:00
#> 27 Kersselaerspleyn   11000       CA     155511      2 2011 2011-06-24 00:00:00
#> 28 Kersselaerspleyn   11000       CA     155521      2 2011 2011-05-12 00:00:00
#> 29 Kersselaerspleyn   11000       CA     155531      2 2011 2011-05-12 00:00:00
#> 30           Harras   21000       CA         17      2 2019 2019-04-10 10:26:12
#> 31           Harras   21000       CA         18      2 2019 2019-04-10 10:30:45
#> 32           Harras   21000       CA         19      2 2019 2019-04-10 10:30:45
#> 33           Harras   21000       CA         20      2 2019 2019-04-10 10:30:45
#> 34           Harras   21000       CA         21      2 2019 2019-04-10 10:30:45
#> 35           Harras   21000       CA         22      2 2019 2019-04-10 10:30:45
#> 36           Harras   21000       CA         23      2 2019 2019-04-10 10:30:45
#> 37           Harras   21000       CA         24      2 2019 2019-04-10 13:16:11
#> 38           Harras   21000       CA         25      2 2019 2019-04-10 13:22:26
#> 39           Harras   21000       CA         26      2 2019 2019-04-10 13:22:26
#> 40     Sevendonck A  141100       CA          1      2 2017 2017-06-22 12:26:59
#> 41     Sevendonck A  141100       CA          2      2 2017 2017-06-22 11:44:27
#> 42     Sevendonck A  141100       CA          3      2 2017 2017-06-22 11:16:31
#> 43 Kersselaerspleyn    2006       CP       2001      3 2021 2021-06-18 00:00:00
#> 44 Kersselaerspleyn   11000       CA     155511      3 2021 2021-07-20 00:00:00
#> 45 Kersselaerspleyn   11000       CA     155521      3 2021 2021-07-20 00:00:00
#> 46 Kersselaerspleyn   11000       CA     155521      3 2021 2021-04-21 00:00:00
#> 47 Kersselaerspleyn   11000       CA     155531      3 2021 2021-04-21 00:00:00
#>    totalplotarea_ha plotarea_ha species coverage_id browse_index_id
#> 1         0.1017876      0.0256     131           1              NA
#> 2         0.1017876      0.0256     161           6              NA
#> 3         0.1257000      0.0256      NA          NA              NA
#> 4         0.0706858      0.0256     161          18              NA
#> 5         0.2827000      0.0256     161           6              NA
#> 6        10.7485378     10.7485      NA          NA              NA
#> 7        10.7485378     10.7485      NA          NA              NA
#> 8        10.7485378     10.7485      NA          NA              NA
#> 9         0.9800008      0.9800     131           1              NA
#> 10        0.9800008      0.9800     131           6              NA
#> 11        0.9800008      0.9800     131           8              NA
#> 12        0.9800008      0.9800     131          10              NA
#> 13        0.9800008      0.9800     161           2              NA
#> 14        0.9800008      0.9800     131           9              NA
#> 15        0.9800008      0.9800     131          13              NA
#> 16        0.9800008      0.9800     131          11              NA
#> 17        0.9800008      0.9800     131           8              NA
#> 18        0.9800008      0.9800     131          11              NA
#> 19        0.9800008      0.9800     131           8              NA
#> 20        0.4989261      0.5000     161          11              NA
#> 21        0.4989261      0.5000     161           8              NA
#> 22        0.4989261      0.5000     161           1              NA
#> 23        0.1017876      0.0256     161           7              NA
#> 24        0.1017876      0.0256     131           8              NA
#> 25        0.0706858      0.0256     161          17             100
#> 26        0.2827000      0.0256     161           1              NA
#> 27       10.7485378     10.7485      NA          NA              NA
#> 28       10.7485378     10.7485     131           3              NA
#> 29       10.7485378     10.7485     131           3              NA
#> 30        0.9800008      0.9800     131           6             100
#> 31        0.9800008      0.9800     131           7             100
#> 32        0.9800008      0.9800     131          11             100
#> 33        0.9800008      0.9800     131          11             100
#> 34        0.9800008      0.9800     131          13             100
#> 35        0.9800008      0.9800     131          14             100
#> 36        0.9800008      0.9800     131          14             100
#> 37        0.9800008      0.9800     131          11             100
#> 38        0.9800008      0.9800     131          15             100
#> 39        0.9800008      0.9800     131          11             100
#> 40        0.4989261      0.5000     161          14             100
#> 41        0.4989261      0.5000     161           6             100
#> 42        0.4989261      0.5000     161           6             100
#> 43        0.2827000      0.0256     161           4             120
#> 44       10.7485378     10.7485      NA          NA             100
#> 45       10.7485378     10.7485     161           1             100
#> 46       10.7485378     10.7485     131           2             100
#> 47       10.7485378     10.7485     131           4             100
#>    coverage_class_average_perc length_core_area_m width_core_area_m
#> 1                          0.5                 NA                NA
#> 2                          2.0                 NA                NA
#> 3                           NA                 NA                NA
#> 4                         97.5                 NA                NA
#> 5                          2.0                 NA                NA
#> 6                           NA                 NA                NA
#> 7                           NA                 NA                NA
#> 8                           NA                 NA                NA
#> 9                          0.5                140                70
#> 10                         2.0                140                70
#> 11                         7.5                140                70
#> 12                        20.0                140                70
#> 13                         0.5                140                70
#> 14                        12.5                140                70
#> 15                        50.0                140                70
#> 16                        30.0                140                70
#> 17                         7.5                140                70
#> 18                        30.0                140                70
#> 19                         7.5                140                70
#> 20                        30.0                100                50
#> 21                         7.5                100                50
#> 22                         0.5                100                50
#> 23                         4.0                 NA                NA
#> 24                         7.5                 NA                NA
#> 25                        90.0                 NA                NA
#> 26                         0.5                 NA                NA
#> 27                          NA                 NA                NA
#> 28                         0.5                 NA                NA
#> 29                         0.5                 NA                NA
#> 30                         2.0                140                70
#> 31                         4.0                140                70
#> 32                        30.0                140                70
#> 33                        30.0                140                70
#> 34                        50.0                140                70
#> 35                        60.0                140                70
#> 36                        60.0                140                70
#> 37                        30.0                140                70
#> 38                        70.0                140                70
#> 39                        30.0                140                70
#> 40                        60.0                100                50
#> 41                         2.0                100                50
#> 42                         2.0                100                50
#> 43                         0.5                 NA                NA
#> 44                          NA                 NA                NA
#> 45                         0.5                 NA                NA
#> 46                         0.5                 NA                NA
#> 47                         0.5                 NA                NA
#>    core_area_ha
#> 1            NA
#> 2            NA
#> 3            NA
#> 4            NA
#> 5            NA
#> 6       10.7485
#> 7       10.7485
#> 8       10.7485
#> 9        0.9800
#> 10       0.9800
#> 11       0.9800
#> 12       0.9800
#> 13       0.9800
#> 14       0.9800
#> 15       0.9800
#> 16       0.9800
#> 17       0.9800
#> 18       0.9800
#> 19       0.9800
#> 20       0.5000
#> 21       0.5000
#> 22       0.5000
#> 23           NA
#> 24           NA
#> 25           NA
#> 26           NA
#> 27      10.7485
#> 28      10.7485
#> 29      10.7485
#> 30       0.9800
#> 31       0.9800
#> 32       0.9800
#> 33       0.9800
#> 34       0.9800
#> 35       0.9800
#> 36       0.9800
#> 37       0.9800
#> 38       0.9800
#> 39       0.9800
#> 40       0.5000
#> 41       0.5000
#> 42       0.5000
#> 43           NA
#> 44      10.7485
#> 45      10.7485
#> 46      10.7485
#> 47      10.7485