ats_parse_pos: Parse Fixes

View source: R/fetch_ats.R

ats_parse_posR Documentation

Parse Fixes

Description

Convert http response to tibble

Usage

ats_parse_pos(resp, trans)

Arguments

resp

HTTP response object

trans

Tibble of corresponding transmission data

Value

A tibble with 25 columns (see fetch_ats_positions)

Notes

Data can be retrieved either via httr::GET (for all transmissions) or httr::POST (by collar), and each request type can return two different formats depending on whether there is data available. This function handles the four different possibilities and returns a tibble with the same column names and types no matter what. GmtOffset is multiplied by -1 to correct for ATS using non-standard syntax. Dates in UTC and current system time zone are added. Column substitutions in neolink modes are reversed.

See Also

fetch_ats_positions

Examples

## Not run: 

ats_login("mary", ".")

trans <- fetch_ats_transmissions()

ats_get(
  path = list(
    "download_all_data",
    paste0("Download_all_data.aspx?dw=all")
  ),
  task = "download position data"
) %>%
  ats_parse_pos(trans)


## End(Not run)


Huh/collar documentation built on Aug. 5, 2022, 11:02 p.m.