airsis_parseData: Parse AIRSIS data string

View source: R/airsis_parseData.R

airsis_parseDataR Documentation

Parse AIRSIS data string

Description

Raw character data from AIRSIS are parsed into a tibble. The incoming fileString can be read in directly from AIRSIS using airsis_downloadData() or from a local file using readr::read_file().

The type of monitor represented by this fileString is inferred from the column names using airsis_identifyMonitorType() and appropriate column types are assigned. The character data are then read into a tibble and augmented in the following ways:

  1. Longitude, Latitude and any System Voltage values, which are only present in GPS timestamp rows, are propagated foward using a last-observation-carry-forward algorithm'

  2. Longitude, Latitude and any System Voltage values, which are only present in GPS timestamp rows, are propagated backwords using a first-observation-carry-backward algorithm'

  3. GPS timestamp rows are removed'

Usage

airsis_parseData(fileString)

Arguments

fileString

character string containing AIRSIS data as a csv

Value

Dataframe of AIRSIS raw monitor data.

References

Interagency Real Time Smoke Monitoring

Examples

## Not run: 
# Fail gracefully if any resources are not available
try({

library(PWFSLSmoke)
fileString <- airsis_downloadData(20150701, 20151231, provider='USFS', unitID='1026')
tbl <- airsis_parseData(fileString)
summary(tbl)

}, silent = FALSE)

## End(Not run)

MazamaScience/PWFSLSmoke documentation built on July 3, 2023, 11:03 a.m.