get_shark_options: Retrieve Available Search Options from SHARK API

get_shark_optionsR Documentation

Retrieve Available Search Options from SHARK API

Description

The get_shark_options function retrieves available search options from the SHARK database hosted by SMHI. It sends a GET request to the SHARK API and returns the results as a structured data.frame.

Usage

get_shark_options(prod = TRUE, unparsed = FALSE)

Arguments

prod

Logical. Query against PROD or TEST (SMHI internal) server. Default is TRUE (PROD).

unparsed

Logical. If TRUE, returns the complete JSON output as list. Defaults to FALSE.

Details

This function sends a GET request to the SHARK API options endpoint to retrieve available search filters and options for querying the database. The API returns data in JSON format, which is then parsed into a data.frame.

Value

A data.frame containing the available search options from the SHARK API.

See Also

get_shark_table

Examples

## Not run: 
  # Retrieve available search options
  shark_options <- get_shark_options()
  View(shark_options)

  # View available datatypes
  dataTypes <- shark_options$dataTypes
  print(dataTypes)

## End(Not run)


sharksmhi/SHARK4R documentation built on Jan. 9, 2025, 5:15 p.m.