Description Usage Arguments Details Value Examples
The url is composed of a base that never changes, a collar id, a collar key data type and either a start id or date at a minimum. These pieces must be put together in a rather particular order with appropriate punctuation. This is the role of these functions.
1 2 3 4 5 6 7 | cdr_build_vec_url(base_url = NULL, collar_id = NULL,
collar_key = NULL, type = c("gps", "act", "mit", "mor", "prx", "SEP",
"TRAP"), after_data_id = NULL, start_date = NULL)
cdr_build_vec_urls(base_url = NULL, collar_id = NULL,
collar_key = NULL, type = c("gps", "act", "mit", "mor", "prx", "SEP",
"TRAP"), after_data_id = NULL, start_date = NULL)
|
base_url |
NULL or the url to build from, the default NULL should suffice in almost all cases |
collar_id |
The ID(s) of the collars to query for data |
collar_key |
The key(s) of the collars to query for data |
type |
The data type, options include "gps", "act", "mit", "mor", "prx", "SEP" and "TRAP". See details. |
after_data_id |
All data types have a unique ID maintained by the manufacturer. Use this parameter to download data after the supplied data ID. Must be equal in length to collar_id and collar_key. Only one of start_date and after_data_id may be supplied, but one of the two must be supplied. |
start_date |
A character vector specifying date and time as DD-MM-YYYYTHH:MM:SS (the T is required, for example 01-01-2018T00:00:00). Supplying this parameter will cause the API to only return data collected after the supplied date. Must be equal in length to collar_id and collar_key. Only one of start_date and after_data_id may be supplied, but one must be supplied. |
The functions cdr_build_vec_url and cdr_build_vec_urls differ only in that cdr_build_vec_url builds a single url from a collection of length 1 arguments while cdr_build_vec_urls will function on vectors of inputs to create numerous urls. Functionally the user is encouraged to only use the plural version so that code will function regardles of the length of the input.
Data types are defined by the user and only a single data type is returned by the API for any given call. The url tells the API which data type to return, such that passing
"gps" returns location data
"act" returns activity data
"mit" returns implant mortality data
"mor" returns mortality data
"prx" returns proximity data
"SEP" returns separation data
"TRAP" returns trap event data
Formatted url(s) as a character string
1 2 3 4 5 6 7 8 9 10 11 12 13 | cdr_build_vec_urls(
base_url = NULL,
collar_id = cdr_get_id_from_key(
system.file("extdata", package = "CollarDownloadeR")
),
collar_key = cdr_get_keys(
system.file(
"extdata",
package = "CollarDownloadeR"
)
),
type = "act"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.