airnow_downloadHourlyData: Download hourly data from AirNow

Description Usage Arguments Value Note See Also Examples

View source: R/airnow_downloadHourlyData.R

Description

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.

Usage

1
2
3
4
airnow_downloadHourlyData(
  datestamp = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d00", tz = "UTC"),
  baseUrl = "https://files.airnowtech.org/airnow"
)

Arguments

datestamp

Integer or character representing YYYYMMDDHH.

baseUrl

Base URL for archived hourly data.

Value

Dataframe of AirNow hourly data.

Note

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.

See Also

airnow_createDataDataframes

airnow_downloadParseData

Examples

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)

PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.