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.
airnow_downloadHourlyData(
datestamp = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d00", tz = "UTC"),
baseUrl = "https://files.airnowtech.org/airnow"
)
Integer or character representing YYYYMMDDHH.
Base URL for archived hourly data.
Dataframe of AirNow hourly data.
# NOT RUN {
# Fail gracefully if any resources are not available
try({
df <- airnow_downloadHourlyData(2018070112)
}, silent = FALSE)
# }
Run the code above in your browser using DataLab