airnow_createMonitorObjects: Obain AirNow data and create ws_monitor objects

Description Usage Arguments Value Note See Also Examples

View source: R/airnow_createMonitorObjects.R

Description

This function uses the airnow_downloadParseData function to download monthly dataframes of AirNow data and restructures that data into a format that is compatible with the PWFSLSmoke package ws_monitor data model.

AirNow data parameters include at least the following list:

  1. BARPR

  2. BC

  3. CO

  4. NO

  5. NO2

  6. NO2Y

  7. NO2X

  8. NOX

  9. NOOY

  10. OC

  11. OZONE

  12. PM10

  13. PM2.5

  14. PRECIP

  15. RHUM

  16. SO2

  17. SRAD

  18. TEMP

  19. UV-AETH

  20. WD

  21. WS

Setting parameters=NULL will generate a separate ws_monitor object for each of the above parameters.

Usage

1
2
3
4
5
6
7
airnow_createMonitorObjects(
  parameters = NULL,
  startdate = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d", tz = "UTC"),
  hours = 24,
  zeroMinimum = TRUE,
  addGoogleMeta = TRUE
)

Arguments

parameters

vector of names of desired pollutants or NULL for all pollutants

startdate

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

hours

desired number of hours of data to assemble

zeroMinimum

logical specifying whether to convert negative values to zero

addGoogleMeta

logicial specifying wheter to use Google elevation and reverse geocoding services

Value

List where each element contains a ws_monitor object for a unique parameter (e.g: "PM2.5", "NOX").

Note

As of 2017-12-17, it appears that hourly data are available only for 2016 and not for earlier years.

See Also

airnow_createDataDataframes

airnow_createMetaDataframes

Examples

1
2
3
4
5
6
## Not run: 
monList <- airnow_createMonitorObjects(c("PM2.5"), 20190625)
pm25 <- monList$PM2.5
o3 <- monList$O3

## End(Not run)

PWFSLSmoke documentation built on July 8, 2020, 7:19 p.m.