construct_query: construct_query

View source: R/process.R

construct_queryR Documentation

construct_query

Description

Constructs the queries to get the data. Most importantly, splits it into small enough chunks for the API with mk_time_seq().

Usage

construct_query(apikey, start, end, station_id, params, type)

Arguments

apikey

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

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 100971. (Kaisaniemi weather station). A list of the available stations can be downloaded with the get_stations()-function.

params

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

type

Type of the query, must be one of the following: ⁠"weather-daily", "weather-hourly", "airquality", "radiation"⁠.

Value

A list queries; one for each time chunk


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