Description Usage Arguments Value Note See Also Examples
View source: R/airnow_downloadHourlyData.R
The https://airnowtech.org site provides both air pollution monitoring data as well as monitoring site location metadata. This function retrieves a single, hourly data file and returns it as a dataframe which includes a monitor's site name and parameters monitored.
1 2 3 4 | airnow_downloadHourlyData(
datestamp = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d00", tz = "UTC"),
baseUrl = "https://files.airnowtech.org/airnow"
)
|
datestamp |
Integer or character representing YYYYMMDDHH. |
baseUrl |
Base URL for archived hourly data. |
Dataframe of AirNow hourly data.
As of 2016-12-27, it appears that hourly data are available only for 2016 and not for earlier years.
Data from locations whose timezones have a fractional offset from UTC are removed as the PWFSLSmoke data model only supports data reported on hour boundaries. As of 2019-06-26, this only applies to US Department of State monitors in Myanmar, Sri Lanka, India and Nepal.
airnow_createDataDataframes
airnow_downloadParseData
1 2 3 4 5 6 7 8 9 | ## Not run:
# Fail gracefully if any resources are not available
try({
df <- airnow_downloadHourlyData(2018070112)
}, silent = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.