This function queries the Meetnetten database for visit data (data about a counting event) for a specified monitoring scheme or for all monitoring schemes within a specified species group. When no monitoring scheme or species group is specified, the visits of all monitoring schemes are returned.
Usage
get_meetnetten_visits(
connection,
scheme_name = NULL,
species_group = NULL,
collect = FALSE
)Arguments
- connection
dbconnection with the database 'S0008_00_Meetnetten' on the inbo-sql08-prd.inbo.be server.
- scheme_name
the name of the monitoring scheme for which you want to extract visit data.
- species_group
the name of the species group for which you want to extract visit data.
- 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. IfTRUEthe 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 following
variables:
species_groupscheme: the name of the monitoring schemeprotocol: the protocol usedlocation: the name of the locationvisit_id: unique id for a count eventvalidation_status: validation status of the visit (visits that are validated and not approved are not provided)10: visit not validated100: visit validated and approved
start_date: the start date of the visitstart_time: the start time of the visitend_date: the end date of the visitend_time: the end time of the visitdate_created: the date at which the data was imported in the databasevisit_status: the status of the visit (determined by the observer) using following categories:conform protocol: the protocol was appliedweersomstandigheden waren ongunstig: weather conditions were unfavourabletelmethode uit handleiding niet gevolgd: the protocol was not appliedgeen veldwerk mogelijk - locatie ontoegankelijk: counting was not possible because the location is inaccessiblegeen veldwerk mogelijk - locatie is ongeschikt voor de soort: counting was not possible because the location is not suitable for the species
for_analysis: whether the data is suited for analysis (determined by the validator)for_targets: every year targets are set in terms of the number of locations that have to be counted per monitoring scheme; whenfor_targets=TRUEthe visit contributes to these targetsnotes: notes by the observer
See also
Other meetnetten:
get_meetnetten_locations(),
get_meetnetten_observations(),
get_meetnetten_schemes()
Examples
if (FALSE) { # \dontrun{
library(inbodb)
con <- connect_inbo_dbase("S0008_00_Meetnetten")
# get visits for a specific monitoring scheme and collect data
get_meetnetten_visits(con, scheme_name = "Boomkikker", collect = TRUE)
# get visits for a specific species_group and collect data
get_meetnetten_visits(con, species_group = "libellen", collect = TRUE)
# get visits for all species and do not collect data
visits_all <- get_meetnetten_visits(con)
# Close the connection when done
dbDisconnect(con)
rm(con)
rm(visits_all)
} # }