Skip to contents

Get metadata for the source entities.

Usage

get_sources(
  ids = NULL,
  types = NULL,
  elements = NULL,
  geometry = NULL,
  nearest_max_count = NULL,
  valid_time = NULL,
  name = NULL,
  country = NULL,
  county = NULL,
  municipality = NULL,
  wmo_id = NULL,
  station_holder = NULL,
  external_ids = NULL,
  icao_code = NULL,
  ship_code = NULL,
  wigos_id = NULL,
  fields = NULL,
  version = "v0",
  format = c("jsonld", "csv"),
  client = get_frost_client(),
  auth_type = c("basic", "oauth"),
  flatten = TRUE,
  return_response = FALSE
)

Arguments

ids

character: Source ID(s).

types

character: Source type. Either "SensorSystem", "InterpolatedDataset", or "RegionDataset".

elements

character: Elements. See `get_elements()` for available values.

geometry

character: Sources defined by a specified geometry. Geometries are specified as either nearest(POINT(...)) or POLYGON(...) using well-known text representation for geometry (WKT).

nearest_max_count

character: A string with the maximum number of sources returned when using "nearest(POINT(...))" for `geometry`. Defaults to 1.

valid_time

character: If specified, only sources that have been, or still are, valid/applicable during some part of this interval may be included in the result.pecify <date>/<date>, <date>/now, <date>, or now, where <date> is of the form YYYY-MM-DD, e.g. 2017-03-06. The default is 'now', i.e. only currently valid/applicable sources are included.

name

character: If specified, only sources whose 'name' attribute matches the search filter be included in the result.

country

character: Country. If specified, only sources whose 'country' or 'countryCode' attribute matches the search filter may be included in the result.

county

character: County. If specified, only sources whose 'county' or 'countyId' attribute matches the search filter may be included in the result.

municipality

character: Municipality. If specified, only sources whose 'municipality' or 'municipalityId' attribute matches the search filter may be included in the result.

wmo_id

character: WMO ID. If specified, only sources whose 'wmoId' attribute matches the search filter may be included in the result.

station_holder

character: Station holder. If specified, only sources whose 'stationHolders' attribute contains at least one name that matches the search filter may be included in the result.

external_ids

character: External id. If specified, only sources whose 'externalIds' attribute contains at least one value that matches any of the specified, comma-separated list of search filters may be included in the result.

icao_code

character: ICAO code.

ship_code

character: Ship code. If specified, only sources whose 'shipCodes' attribute contains at least one name that matches this search filter may be included in the result.

wigos_id

character: WIGOS ID. If specified, only sources whose 'wigosId' attribute matches the search filter may be included in the result.

fields

character: Fields to return in the response.

version

character: API version.

format

character: Response format.

client

list: List with client id and secret. Defaults to the `MET_FROST_ID` and `MET_FROST_SECRET` environment variables.

auth_type

character: Authentication method, either 'basic' or 'oauth'.

flatten

logical: If TRUE the response is transformed to a table.

return_response

logical: If TRUE a list of class `frost_api` is returned, including the raw `httr2_response`.

Value

tibble or list

Details

Use the default query parameters to retrieve all sources.

Examples

if (FALSE) {
# Get all sources
df <- get_sources()
}