Publish a chart on Datawrapper.
dw_publish_chart(chart_id, api_key = "environment", return_urls = TRUE)
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.
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
Optional. If TRUE (default) it returns the code for the responsive iFrame and an URL to the chart.
A message that specifies, if the publication was successful. If set, including the iFrame-Code and chart-URL.
This function publishes a chart in Datawrapper.
if (FALSE) dw_publish_chart("aBcDE") # uses the preset key in the .Renviron-file if (FALSE) dw_publish_chart(chart_id = "a1B2Cd", api_key = "1234ABCD") # uses the specified key if (FALSE) dw_publish_chart(chart_id = "a1B2Cd", return_urls = FALSE) # won't return code and URLs for chart