airsis_createMonitorObject: Obain AIRSIS Data and Create ws_monitor Object

Description Usage Arguments Value Note See Also Examples

View source: R/airsis_createMonitorObject.R

Description

Obtains monitor data from an AIRSIS webservice and converts it into a quality controlled, metadata enhanced ws_monitor object ready for use with all monitor_~ functions.

Steps involved include:

  1. download CSV text

  2. parse CSV text

  3. apply quality control

  4. apply clustering to determine unique deployments

  5. enhance metadata to include: elevation, timezone, state, country, site name

  6. reshape AIRSIS data into deployment-by-property meta and and time-by-deployment data dataframes

QC parameters that can be passed in the ... include the following valid data ranges as taken from airsis_EBAMQualityControl():

Note that appropriate values for QC thresholds will depend on the type of monitor.

Usage

1
2
3
4
5
6
7
airsis_createMonitorObject(startdate = strftime(lubridate::now(),
  "%Y010100", tz = "UTC"), enddate = strftime(lubridate::now(),
  "%Y%m%d23", tz = "UTC"), provider = NULL, unitID = NULL,
  clusterDiameter = 1000, zeroMinimum = TRUE,
  baseUrl = "http://xxxx.airsis.com/vision/common/CSVExport.aspx?",
  saveFile = NULL, existingMeta = NULL, addGoogleMeta = FALSE,
  addEsriMeta = FALSE, ...)

Arguments

startdate

desired start date (integer or character representing YYYYMMDD[HH])

enddate

desired end date (integer or character representing YYYYMMDD[HH])

provider

identifier used to modify baseURL ['APCD'|'USFS']

unitID

character or numeric AIRSIS unit identifier

clusterDiameter

diameter in meters used to determine the number of clusters (see addClustering())

zeroMinimum

logical specifying whether to convert negative values to zero

baseUrl

base URL for data queries

saveFile

optional filename where raw CSV will be written

existingMeta

existing 'meta' dataframe from which to obtain metadata for known monitor deployments

addGoogleMeta

logicial specifying wheter to use Google elevation and reverse geocoding services

addEsriMeta

logicial specifying wheter to use ESRI elevation and reverse geocoding services

...

additional parameters are passed to type-specific QC functions

Value

A ws_monitor object with AIRSIS data.

Note

The downloaded CSV may be saved to a local file by providing an argument to the saveFile parameter.

See Also

airsis_downloadData

airsis_parseData

airsis_qualityControl

addClustering

airsis_createMetaDataframe

airsis_createDataDataframe

Examples

1
2
3
4
5
6
## Not run: 
initializeMazamaSpatialUtils()
usfs_1013 <- airsis_createMonitorObject(20150301, 20150831, 'USFS', unitID='1013')
monitorLeaflet(usfs_1013)

## End(Not run)

PWFSLSmoke documentation built on Oct. 6, 2018, 1:03 a.m.