sensor_isSensor: Test for correct structure in a _sensor_ object

View source: R/utils-sensor.R

sensor_isSensorR Documentation

Test for correct structure in a sensor object

Description

The sensor is checked for the 'sensor' class name and presence of core metadata columns:

  • ID – Purple Air ID

  • label – location label

  • sensorType – PurpleAir sensor type

  • longitude – decimal degrees E

  • latitude – decimal degrees N

  • timezone – Olson timezone

  • countryCode – ISO 3166-1 alpha-2

  • stateCode – ISO 3166-2 alpha-2

  • pwfsl_closestDistance – distance in meters from an official monitor

  • pwfsl_closestMonitorID – identifer for the nearest official monitor

The "pwfsl", official, monitors are obtained from the USFS AirFire site using the PWFSLSmoke R package.

Usage

sensor_isSensor(sensor = NULL)

Arguments

sensor

sensor object

Value

TRUE if sensor has the correct structure, FALSE otherwise.

Examples

example_sensor <- pat_createAirSensor(example_pat)
sensor_isSensor(example_sensor)


MazamaScience/AirSensor documentation built on April 28, 2023, 11:16 a.m.