Replace impossible volume and occupancy values with NA at given interval

replace_impossible(sensor_data, interval_length = NA)

Arguments

sensor_data

data frame for single sensor returned from pull_sensor()

interval_length

numeric, the interval length in hours. NA indicates no aggregation (30 second data) 0.25 indicates 15 minutes. Default is 1.

Value

the original data.table with impossible volume and occupancy values replaced with NA.

Details

Criteria

- 30-sec
  - Total 30-second volume exceeds 20 cars
  - Total 30-second occupancy exceed 1,800 scans
- Hourly
  - Total hourly occupancy exceeds 216,000 scans (60 scans per second \* 60 secs per min \*
    60 mins per hour = 216,000 scans per hour)
  - Total hourly volume exceeds 2,300 cars
- Percent nulls >= 10%