This function queries the INBOVEG database for header information (metadata for a vegetation-recording or releve) for one or more surveys and the recorder type. All records, also with 'work needed' are selected. See the examples for how to get information for all surveys.

get_inboveg_header(
  connection,
  survey_name,
  rec_type,
  multiple = FALSE,
  collect = FALSE
)

Arguments

connection

dbconnection with the database 'Cydonia' on the inbo-sql07-prd server

survey_name

A character string or a character vector giving the name or names of the survey(s) for which you want to extract header information. If missing, all surveys are returned.

rec_type

A character vector giving the name of record type for which you want to extract header information e.g. 'Classic', 'Classic-emmer', 'Classic-ketting', 'BioHab', 'ABS'. If missing, all recording types are returned.

multiple

If TRUE, survey_name can take a character vector with multiple survey names that must match exactly. If FALSE (the default), survey_name must be a single character string (one survey name) that can include wildcards to allow partial matches

collect

If FALSE (the default), a remote tbl object is returned. This is like a reference to the result of the query but the full result of the query is not brought into memory. If TRUE the full result of the query is collected (fetched) from the database and brought into memory of the working environment.

Value

A remote tbl object (collect = FALSE) or a tibble dataframe (collect = TRUE) with variables RecordingGivid, Name, UserReference, Observer, LocationCode, Latitude, Longitude, Area (in m2), Length (in cm), Width (in cm), VagueDateType, VagueDateBegin, VagueDateEnd, SurveyId, RecTypeID.

Examples

if (FALSE) {
library(inbodb)
con <- connect_inbo_dbase("D0010_00_Cydonia")

# get header information from a specific survey and a specific recording type
# and collect the data
header_info <- get_inboveg_header(con, survey_name = "OudeLanden_1979",
rec_type = "Classic", collect = TRUE)

# get header information from several specific surveys
header_severalsurveys <- get_inboveg_header(con, survey_name =
c("MILKLIM_Heischraal2012", "NICHE Vlaanderen"), multiple = TRUE)

# get header information of all surveys,  don't collect the data
all_header_info <- get_inboveg_header(con)

# close the connection when done
dbDisconnect(con)
rm(con)
}