fetch_lotek_positions | R Documentation |
Retrieves GPS data optionally filtered by date or collar.
fetch_lotek_positions(device_id = NULL, start_date = NULL, end_date = NULL)
device_id |
A single device id, or a list or vector of device ids, or NULL for all devices associated with current account. |
start_date |
Only fixes at or after start_date will be included in the output. Must be in the format YYYY-MM-DD HH:MM:SS. If NULL Jan 1 1970 is used. |
end_date |
Only fixes at or before end_date are included, analagous to start_date above. If NULL current date/time is used. |
A tibble containing position data, or an empty tibble in the same format is no rows are returned.
Unlike other fetch_lotek... functions in this package, this will not return an error if the API call fails. This behavior is intentional and due to the fact that failures/errors and successful calls that did not return any data are indistinguishable on the client side. If the API response indicates an error (for either reason) an empty tibble is returned with the same columns as a successful download.
fetch_lotek_alerts
for downloading alerts such as
mortality events, and fetch_lotek_devices
for downloading
a list of collars associated with the current account.
## Not run:
lotek_login("demo", "PASSWORD09")
# all fixes for all collars in 2020
fixes <- fetch_lotek_positions(start_date = "2020-01-01 00:00:00",
end_date = "2021-01-01 00:00:00")
# all fixes for collar 32763
fixes_32763 <- fetch_lotek_positions(device_id = 32763)
# all fixes for collars 32763, 34023, and 42492
fixes_3_cols <- fetch_lotek_positions(device_id = c(32763, 34023, 42492))
# fixes for collar 32763 in 2018
fixes <- fetch_lotek_positions(device_id = 32763,
start_date = "2018-01-01 00:00:00",
end_date = "2019-01-01 00:00:00")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.