fetch_trktg_positions | R Documentation |
Retrieves GPS data optionally filtered by date or collar.
fetch_trktg_positions(
device_id = NULL,
start_date = NULL,
end_date = NULL,
time_zone = Sys.timezone(),
as_sf = FALSE,
sf_crs = 4326
)
device_id |
A single device id, or a list or vector of device ids,
or NULL for all devices associated with current account. Device ids
can be found on the track tag portal (Device ID/UID), or by examining the
'user_id' column in the tibble returned by |
start_date |
Only fixes at or after start_date will be included in the output. Must be a POSIX date or date/time object. 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. |
time_zone |
Time zone used to convert date values to |
as_sf |
Boolean indicating if the result should be converted to an
|
sf_crs |
Coordinate referenece system for converting to |
A tibble or sf object with 21 columns:
User label assigned through track tag portal (character)
Fix date/time (POSIXct)
Date/time received via satellite (character)
Address nearest the GPS fix (character)
GPS coordinates (character)
Speed with units (character)
Unknown (character)
Unknown (character)
Transmission method (character)
Unknown (character)
Unknown (character)
Unknown (character)
Unknown (character)
fetch_trktg_devices
for downloading a list of
transmitters associated with the current account.
## Not run:
trktg_login("some_user", "some_users_pw")
# all fixes for all transmitters in 2024
fixes <- fetch_trktg_positions(
start_date = "2024-01-01 00:00:00",
end_date = "2025-01-01 00:00:00"
)
# all fixes for a single transmitter
fixes_single_tr <- fetch_trktg_positions(device_id = "012345678")
# all fixes for multiple transmitters
fixes_2_devices <- fetch_trktg_positions(
device_id = c("012345678", "012345679")
)
# fixes from the last week for a single transmitter
fixes <- fetch_trktg_positions(
device_id = "012345678",
start_date = Sys.Date() - 7
)
# fixes from the last week as an sf object
fixes <- fetch_trktg_positions(
start_date = Sys.Date() - 7,
as_sf = TRUE
)
trktg_logout()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.