Description Usage Arguments Value Note See Also Examples
View source: R/airnow_createDataDataframes.R
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. The output is meant to be used as the df
argument in other
PWFSLSmoke functions (e.g. airnow_qualityControl).
AirNow data parameters include at least the following list:
BARPR
BC
CO
NO
NO2
NO2Y
NO2X
NOX
NOOY
OC
OZONE
PM10
PM2.5
PRECIP
RHUM
SO2
SRAD
TEMP
UV-AETH
WD
WS
Setting parameters=NULL
will generate a separate dataframe for each of
the above parameters.
1 2 3 4 5 | airnow_createDataDataframes(
parameters = NULL,
startdate = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d00", tz = "UTC"),
hours = 24
)
|
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. |
List of dataframes where each dataframe contains all data for a unique parameter (e.g: "PM2.5", "NOX").
As of 2016-12-27, it appears that hourly data are available only for 2016 and not for earlier years.
airnow_downloadParseData
airnow_qualityControl
1 2 3 4 5 6 7 8 9 | ## Not run:
# Fail gracefully if any resources are not available
try({
airnowList <- airnow_createDataDataframes("PM2.5", 2019062500)
}, silent = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.