fmi_airquality: fmi_airquality

View source: R/fmi_download.R

fmi_airqualityR Documentation

fmi_airquality

Description

Download data from the fmi (urban) airquality API. If the request is larger than the api allows, it is split into multiple parts. If this results to more than 30 queries, a warning message is printed.

Usage

fmi_airquality(
  start,
  end = start,
  station_id = "100742",
  params = "aqindex_pt1h_avg",
  simplify_names = TRUE,
  verbose = FALSE,
  fmi_apikey = NA_character_
)

Arguments

start

Start time as a POSIXt-object obtained with e.g. lubridate::as_datetime().

end

End time as a POSIXt-object. Defaults to start.

station_id

The weather station id. Defaults to 100742. (Helsinki Mannerheimintie air quality station). A list of the available stations can be downloaded with the get_stations()-function.

params

Query parameters, a comma separated string, such as "pm10_pt1h_avg,pm25_pt1h_avg". For more options, see Details.

simplify_names

If TRUE, variable names are simplified (eg. aqindex_pt1h_avg is converted to airquality).

verbose

If TRUE, prints the progress. Defaults to FALSE.

fmi_apikey

An optional fmi-apikey. See http://en.ilmatieteenlaitos.fi/open-data-manual.

Details

The available variables are listed below, more information can be found from https://en.ilmatieteenlaitos.fi/open-data-manual.

The following variables are available:

  • aqindex_pt1h_avg: air quality index

  • co_pt1h_avg: carbon monoxide

  • no2_pt1h_avg: nitrogen dioxide

  • no_pt1h_avg: nitrogen monoxide

  • o3_pt1h_avg: ozone

  • pm10_pt1h_avg: particulate matter < 10 nm

  • pm25_pt1h_avg: particulate matter < 2.5 nm

  • qbcpm25_pt1h_avg: black carbon pm2.5

  • so2_pt1h_avg: sulphur dioxide

  • trsc_pt1h_avg: odorous sulphur compounds

Value

A tibble with time in the first column and the variables specified in params in the other columns.


paasim/simplefmi documentation built on Aug. 4, 2023, 10:30 p.m.