wcGetDownload: Retrieve data from Wildlife Computers Data Portal

View source: R/wcGetDownload.R

wcGetDownloadR Documentation

Retrieve data from Wildlife Computers Data Portal

Description

wcGetDownload will return a list of data frames containing deployment data

Usage

wcGetDownload(
  id,
  wc.key = Sys.getenv("WCACCESSKEY"),
  wc.secret = Sys.getenv("WCSECRETKEY"),
  keyfile = NULL,
  tidy = TRUE
)

Arguments

id

a single character representing a data portal unique deployment identifier

tidy

whether to tidy the histogram data stream and create a timelines output

Details

The Wildlife Computers Data Portal will return deployment data in the form of a zipped file with various comma-separated files and other accessory files. The *.csv files correspond to particular data streams. This function, currently, focuses on the locations, behavior, histograms, timelines, status, and messages data streams.

For most of the files, the data are read in with read.csv and, other than a few steps to set the data types, the data are provided 'as is'. The one exception is the histogram data stream. Here, we use the tidyr and dplyr package to 'tidy' the data into a more appropriate data structure. For now, this is only implemented with timeline data and the 'tidy'd' data is provided within the list element $timelines

Value

a list of data frames with up to 6 named elemnts (locations, behavior, histograms, status,timelines,messages)


jmlondon/wcUtils documentation built on March 19, 2024, 8:40 a.m.