View source: R/dw_retrieve_chart_metadata.R
dw_retrieve_chart_metadata | R Documentation |
Return the metadata of a existing Datawrapper chart.
dw_retrieve_chart_metadata(chart_id, api_key = "environment")
chart_id |
Required. A Datawrapper-chart-id as character string, usually a five character combination of digits and letters, e.g. "aBcDe". Or a dw_chart-object. |
api_key |
Optional. A Datawrapper-API-key as character string. Defaults to "environment" - tries to automatically retrieve the key that's stored in the .Reviron-file by |
A S3-structure of type dw_chart with the elements from the Datawrapper-API stored under content. Same as in dw_create_chart
.
status |
Returns 'ok' if the API-key used was correct. |
$data$id |
Returns the internal id of the chart - the same as used in chart_id. |
$data$title |
Returns the chart's title. |
$data$theme |
Returns the chart's theme. |
$data$createdAt |
Chart's creation date. |
$data$lastModifiedAt |
Chart's last modification date. |
$data$metadata |
Contains chart's specifications, like transpose, column formats, visualization settings, colors, titles and texts |
$data$metadata$visualize |
Contains the chart's visualization settings. |
$data$metadata$describe |
Contains the chart's description settings, like title, source name and url, byline |
$data$publishedAt |
Chart's publication date - if published yet. |
$data$author$id |
The chart-author's id. |
This function retrieves all metadata about a chart that's stored by Datawrapper. It is helpful to gain insights in the different options that might be changed via the API.
Benedict Witzenberger
## Not run:
dw_retrieve_chart_metadata("aBcDE")
## End(Not run) # uses the preset key in the .Renviron-file
## Not run: dw_retrieve_chart_metadata(chart_id = "a1B2Cd", api_key = "1234ABCD") # uses the specified key
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.