View source: R/dw_get_map_key.R
dw_get_map_key | R Documentation |
Retrieve the keys for a certain basemap from the Datawrapper-API.
dw_get_map_key(api_key = "environment", basemap_id, basemap_value)
api_key |
Required. A Datawrapper-API-key as character string. Defaults to "environment" - tries to automatically retrieve the key that's stored in the .Reviron-file by |
basemap_id |
Required. Can be retrieved by looking at |
basemap_value |
Required. Can be retrieved by looking at |
A S3-structure of type dw_basemap_keys with the elements from the Datawrapper-API, and the following fields:
content |
A data.frame of the returned keys. |
path |
The url of the API call. |
id |
The basemap id provided. |
value |
The basemap value provided. |
This function returns a data.frame with the keys for the requested map. These keys can be used to map data to the basemap.
Benedict Witzenberger
## Not run:
dw_get_map_key(basemap_id = "world2019", basemap_value = "DW_NAME") # uses the preset key in the .Renviron-file
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.