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:
A data.frame of the returned keys.
The url of the API call.
The basemap id provided.
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
if (FALSE) { dw_get_map_key(basemap_id = "world2019", basemap_value = "DW_NAME") # uses the preset key in the .Renviron-file }