Construct a query to the FMI API

fmi_query(type = c("real-time", "daily", "monthly"), ...)

Arguments

type

A length 1 character vector specifying the measurement interval of the observations to request

...

Name-value pairs of character vectors, used as query parameters. See details for possible values.

Value

A character vector containing query URLs for the FMI API.

Details

The list of possible parameters passed in ... depends on the type and format of the query being constructed. Query-specific parameters are fully documented in the FMI Open Data Manual.

Common parameters include:

starttime, endtime

A date or datetime specifying the start/end of the interval to request data for. These must be in the ISO-8601 format.

place

A string specifying the place of measurement in general terms. E.g. "Helsinki", "Oulu"

See also

fmi_data() to request data from the API.

Examples

fmi_query("real-time", place = "Helsinki")
#> [1] "https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=GetFeature&storedquery_id=fmi::observations::weather::simple&place=Helsinki"