The searchWB function provides the main interface to the Wilbook
framework and can be used in one of three ways. First, users may supply
filters based on the variables within the database. These filters are
combined in a single JDOQL statement which is then combined with the base
URL, username, and password to create the URL search string for data
extraction. Second, users may supply the JDOQL string, username and password,
and base URL as separate arguments. Finally, users may supply the search URL
directly.
We envisage that most users will supply filters to create the search URL. The
other options allow users to easily repeat or modify previous searches and
enable advanced users familiar with the JDOQL API and internals of the
Wildbook framework to conduct more complex searches. More examples of extracting
data from the Wildbook framework with thesearchWB function can be found
in the rwildbook-demo-1 of the RWildbook package.
Filtering Locations
Locations may be filtered with either location names or location ids.
Multiple location names can be given to the location argument.
Multiple location ids can be given to the locationID argument.
In this case the search will return all objects (encounters or individuals)
matching at least one of the locations.
Filtering Dates
The sighting_date filter may be specified as a character vector of
either one or two elements representing dates. If one date is provided then
results will be filtered from 00:00:00 to 24:00:00 on that day. If two dates
are provided then results will be filtered from 00:00:00 on the first date to
24:00:00 on the second date. By default, dates must be entered using the
"YYYY-MM-DD" format. Other formats may be used by specifying the value of
date_format. More details about the date format can be found in the help
page of as.Date The same rule can apply to the encounter_submission_date,
Date_of_birth and Date_of_death filters.
Defalut NULL value for filter arguments
The default value for some filter arguments are NULL. NULL value for a filter argument
returns data not filtering that argument.