monitor_nowcast {AirMonitor} | R Documentation |
Apply NowCast algorithm to mts_monitor data
Description
A NowCast algorithm is applied to the data in in the
monitor
object. The version
argument specifies the minimum
weight factor and number of hours to be used in the calculation.
Available versions include:
pm
: hours = 12, weight = 0.5pmAsian
: hours = 3, weight = 0.1ozone
: hours = 8, weight = NA
The default, version = "pm"
, is appropriate for typical usage.
Usage
monitor_nowcast(
monitor,
version = c("pm", "pmAsian", "ozone"),
includeShortTerm = FALSE
)
Arguments
monitor |
mts_monitor object. |
version |
Name of the type of nowcast algorithm to be used. |
includeShortTerm |
Logical specifying whether to alcluate preliminary NowCast values starting with the 2nd hour. |
Details
This function calculates each hour's NowCast value based on the value
for the given hour and the previous N-1 hours, where N is the number
of hours appropriate for the version
argument. For example, if
version = "pm"
, the NowCast value for Hour 12 is based on the data
from hours 1-12.
The function returns values when at least two of the previous three hours have data. NA's are returned for hours where this condition is not met.
By default, the funtion will not return a valid value until the Nth hour.
If includeShortTerm = TRUE
, the function will return a valid value
after only the 2nd hour (provided, of course, that both hours are valid).
Calculated Nowcast values are truncated to the nearest .1 ug/m3 for 'pm' and nearest .001 ppm for 'ozone' regardless of the precision of the data in the incoming mts_monitor object.
Value
A modified mts_monitor
object. (A list with
meta
and data
dataframes.)
References
https://en.wikipedia.org/wiki/Nowcast_(Air_Quality_Index)
AQI Technical Assistance Document