Fieldmap
databaseR/load_data_vegetation.R
load_data_vegetation.Rd
This function queries the given database to retrieve data on vegetation (ready for use in calculate_vegetation function).
load_data_vegetation(
database,
plottype = NA,
forest_reserve = NA,
processed = TRUE
)
name of Fieldmap
/Access database (with specific Fieldmap
structure) including path
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)
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)
Should only processed and surveyed data be added? Defaults to TRUE (yes).
Dataframe with vegetation data, containing columns as
total_herb_cover
, total_shrub_cover
, total_tree_cover
,
total_soildisturbance_game
,
date_vegetation
(= date of vegetation survey),
year_main_survey
(= year of vegetation survey), ....
library(forrescalc)
# (add path to your own fieldmap database here)
path_to_fieldmapdb <-
system.file("example/database/mdb_bosres.sqlite", package = "forrescalc")
load_data_vegetation(path_to_fieldmapdb)
#> # A tibble: 43 × 42
#> forest_reserve plot_id plottype subplot_id period year_main_survey
#> <chr> <int> <chr> <int> <int> <int>
#> 1 Everzwijnbad 101 CP 1 1 2002
#> 2 Withoefse heide 204 CP 1 1 2003
#> 3 Liedekerke 1005 CP 1 1 2006
#> 4 Kersselaerspleyn 2006 CP 1 1 2001
#> 5 Kersselaerspleyn 11000 CA 155511 1 2000
#> 6 Kersselaerspleyn 11000 CA 155512 1 2000
#> 7 Kersselaerspleyn 11000 CA 155513 1 2000
#> 8 Harras 21000 CA 17 1 2009
#> 9 Harras 21000 CA 18 1 2009
#> 10 Harras 21000 CA 19 1 2009
#> # ℹ 33 more rows
#> # ℹ 36 more variables: date_vegetation <dttm>, totalplotarea_ha <dbl>,
#> # plotarea_ha <dbl>, total_moss_cover_id <int>, total_herb_cover_id <int>,
#> # total_shrub_cover_id <int>, total_tree_cover_id <int>,
#> # total_waterlayer_cover_id <int>, total_soildisturbance_game_id <int>,
#> # moss_cover_interval <chr>, moss_cover_min <dbl>, moss_cover_max <dbl>,
#> # herb_cover_interval <chr>, herb_cover_min <dbl>, herb_cover_max <dbl>, …