Description Usage Arguments Value Examples
get_elements()
retrieves metadata about weather and
climate elements defined for use in the Frost API. The function requires an
input for client_id
. The other function arguments are optional, and
default to NULL
, which means that the response from the API is not
filtered on these parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | get_elements(client_id,
ids = NULL,
names = NULL,
descriptions = NULL,
units = NULL,
code_tables= NULL,
statuses = NULL,
calculation_method = NULL,
categories = NULL,
time_offsets = NULL,
sensor_levels = NULL,
old_element_codes = NULL,
old_units = NULL,
cf_standard_names = NULL,
cf_cell_methods = NULL,
cf_units = NULL,
cf_versions = NULL,
fields = NULL,
language = NULL,
return_response = FALSE)
|
client_id |
A string. The client ID to use to send requests to the Frost API. |
ids |
A character vector. The element IDs to get metadata for. |
names |
A character vector. The element names to get metadata for. |
descriptions |
A character vector. The descriptions to get metadata for. |
units |
A character vector. The units to get metadata for. |
code_tables |
A character vector. The code tables to get metadata for. |
statuses |
A character vector. The statuses to get metadata for. |
calculation_method |
A string. The calculation method as a JSON filter. Supports the following keys: baseNames, methods, innerMethods, periods, innerPeriods, thresholds, methodDescriptions, innerMethodDescriptions, methodUnits, and innerMethodUnits. |
categories |
A character vector. The categories to get metadata for. |
time_offsets |
A character vector. The time offsets to get metadata for. |
sensor_levels |
A string. The sensor levels to get metadata for as a JSON filter. Supports the following keys: levelTypes, units, defaultValues, and values. |
old_element_codes |
A character vector. The old MET Norway element codes to get metadata for. |
old_units |
A character vector. The old MET Norway units to get metadata for. |
cf_standard_names |
A character vector. The CF standard names to get metadata for. |
cf_cell_methods |
A character vector. The CF cell methods to get metadata for. |
cf_units |
A character vector. The CF units to get metadata for. |
cf_versions |
A character vector. The CF versions to get metadata for. |
fields |
A character vector. Fields to include in the response (i.e. output). If this parameter is specified, then only these fields are returned in the response. If not specified, then all fields will be returned in the response. |
language |
A string. The language of the fields in the response. The options are "en-US" (default), "nb-NO" (Norwegian, Bokmål), and "nn-NO" (Norwegian, Nynorsk). |
return_response |
A logical. If set to |
The function returns either a data frame with metadata about
climate and weather elements, or the response of the GET request, depending
on the boolean value set for return_response
.
1 2 3 4 5 6 7 | ## Not run:
frost_client_id <- "<YOUR FROST CLIENT ID>"
# Get data for all elements
elements_df <- get_elements(client_id = frost_client_id)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.