View source: R/search_themes.R
search_themes | R Documentation |
This function is a wrapper for the Get All Themes Info API. It allows users to get a tibble of all available themes, and their details, in the OneMap.Sg API. It also provides an additional functionality where users can subset their results using search terms.
search_themes(token, ..., more_info = FALSE)
token |
User's API token. This can be retrieved using |
... |
Optional Search terms to subset results; results with any of search terms will be returned. Search terms are not case-sensitive. |
more_info |
Whether more information should be queried, default = |
If no error occurs, a tibble with the following variables:
Name of the Theme
Query name of the Theme
Name of image file used as Icon in OneMap Web Map
Expiry Date of the Theme
Published Date of the Theme
Returned only if more_info = TRUE
. Topic that Theme relates to, e.g. Health, Sports, Environment, etc.
Returned only if more_info = TRUE
. Government Agency who Owns the Dataset
If an error occurs, the function throws an error with error message and status code.
# valid
## Not run: search_themes(token)
## Not run: search_themes(token, "hdb", "parks")
## Not run: search_themes(token, more_info = TRUE)
# error
## Not run: search_themes("my_invalid_token")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.