skills/datawrapper/SKILL.md
Create charts, choropleth maps, and locator maps via the Datawrapper API. Use this skill whenever the user wants to publish a visualization on Datawrapper, create an interactive chart or map from data, generate a PNG/embed from Datawrapper, or use the Datawrapper REST API. Triggers on: "create a map with datawrapper", "publish a chart on datawrapper", "choropleth map", "locator map datawrapper", "export PNG from datawrapper", and any request involving creating or configuring Datawrapper charts/maps programmatically. Also triggers for Italian variants: "mappa coropletica datawrapper", "crea grafico datawrapper", "mappa datawrapper".
npx skillsauth add ondata/skills datawrapperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create and publish Datawrapper charts and maps via REST API.
Auth: Authorization: Bearer $DATAWRAPPER_API (env var — never print the value).
Base URL: https://api.datawrapper.de/v3
curl -s -o /dev/null -w "%{http_code}" \
"https://api.datawrapper.de/v3/me" \
-H "Authorization: Bearer $DATAWRAPPER_API"
200 → key is valid, proceed.401 or 000 → key is missing or invalid. Stop and tell the user:
"
DATAWRAPPER_APIis not set or invalid. Set it withexport DATAWRAPPER_API=<token>(Linux/macOS) or$env:DATAWRAPPER_API='<token>'(PowerShell)."
Do NOT proceed past a non-200 — all subsequent calls will fail silently.
| Visualization | type value |
|---|---|
| Stacked bar | d3-bars-stacked |
| Grouped bar | d3-bars |
| Line | d3-lines |
| Scatter | d3-scatter-plot |
| Pie/donut | d3-pies |
| Choropleth map | d3-maps-choropleth |
| Locator map | locator-map |
Always read the relevant reference file before starting — each file contains the exact step sequence, mandatory properties, and known pitfalls.
CHART_ID=$(curl -s -X POST "https://api.datawrapper.de/v3/charts" \
-H "Authorization: Bearer $DATAWRAPPER_API" \
-H "Content-Type: application/json" \
-d '{"title": "My title", "type": "<type>"}' \
| jq -r '.id')
echo "Chart ID: $CHART_ID"
Always capture the id — needed for all subsequent calls. Print it immediately.
curl -s -X PUT "https://api.datawrapper.de/v3/charts/$CHART_ID/data" \
-H "Authorization: Bearer $DATAWRAPPER_API" \
-H "Content-Type: text/csv" \
--data-binary @/path/to/data.csv
curl -s -X PATCH "https://api.datawrapper.de/v3/charts/$CHART_ID" \
-H "Authorization: Bearer $DATAWRAPPER_API" \
-H "Content-Type: application/json" \
-d '{ "metadata": { ... } }' \
| jq -r '.id // .'
PATCH does a deep merge — each call merges into existing metadata. Old keys persist. To fully replace a nested object, include ALL its keys in a single PATCH call, or create a fresh chart.
curl -s -X POST "https://api.datawrapper.de/v3/charts/$CHART_ID/publish" \
-H "Authorization: Bearer $DATAWRAPPER_API" > /dev/null
Always wait at least 6 seconds after publish before exporting. Datawrapper's CDN
takes a moment to update — exporting immediately returns the previous render.
Use scale=2 to export at double resolution. Omit height so Datawrapper uses
the natural chart height — avoids large blank areas on short charts.
sleep 6
curl -s "https://api.datawrapper.de/v3/charts/$CHART_ID/export/png?unit=px&width=1200&scale=2" \
-H "Authorization: Bearer $DATAWRAPPER_API" \
--output output.png
Always read the exported PNG visually to verify it looks correct before reporting success.
After verifying the PNG, ask the user:
"The PNG has been saved locally. Do you want to delete the chart from Datawrapper?"
If yes:
curl -s -X DELETE "https://api.datawrapper.de/v3/charts/$CHART_ID" \
-H "Authorization: Bearer $DATAWRAPPER_API"
If no, remind the user the chart is available at:
https://app.datawrapper.de/chart/<CHART_ID>/visualize
Always include units of measure (number-append/number-prepend) when values have a unit —
percentages, euros, kilometres, etc. An axis without a unit label is always wrong.
{
"metadata": {
"describe": {
"source-name": "Data source name",
"source-url": "https://source-url.com",
"intro": "Chart or map description",
"byline": "Author or organization",
"number-append": " %",
"number-format": "0.0"
},
"annotate": {
"notes": "Methodology notes, caveats"
}
}
}
See references/chart.md for the full units-of-measure reference.
curl -s "https://api.datawrapper.de/v3/charts/$CHART_ID" \
-H "Authorization: Bearer $DATAWRAPPER_API" \
| jq '.metadata'
Use this to debug when the output doesn't look right — verify what properties Datawrapper actually stored vs. what you intended to send.
curl -s -X DELETE "https://api.datawrapper.de/v3/charts/$CHART_ID" \
-H "Authorization: Bearer $DATAWRAPPER_API"
Useful when iterating: delete a broken chart and start fresh to avoid deep-merge conflicts from previous PATCH calls.
If something doesn't render correctly via API, the user can inspect and fix it at
https://app.datawrapper.de/chart/<ID>/visualize.
After manual edits, read back the config via GET to make it reproducible via API.
development
Guides users step by step in drafting a formal complaint (segnalazione) to Italy's Digital Civic Defender (Difensore Civico per il Digitale, DCD) at AGID for violations of the CAD (Codice dell'Amministrazione Digitale) or other digitalization norms by public administrations. Use this skill whenever someone wants to: report an Italian PA to AGID; write to the Difensore Civico per il Digitale; complain about open data violations, non-machine-readable public data, inaccessible PA portals, missing or restrictive licenses on public data, captchas blocking automated access, unanswered data reuse requests (D.Lgs. 36/2006 art. 5), failure to publish mandatory High Value Datasets (HVD, Reg. (UE) 2023/138), or a prior DCD complaint that got no response. Trigger even if the user does not name the skill — any Italian digital-rights complaint targeting a PA is a candidate.
development
Generate PNG images for online communication — social media, carousels, infographics, posts — using Typst. Use this skill whenever the user wants to create slides, cards, visual posts or any digital graphic content, even if they don't explicitly mention Typst. The skill drives an interview about brand materials (logo, palette, fonts, DESIGN.md), proposes the formats best suited to the context (Instagram 1:1, Stories 9:16, LinkedIn 16:9, etc.) and produces ready-to-use PNGs.
development
Query OpenAlex API from the command line with curl and jq for publication discovery, filtering, sorting, pagination, and PDF availability checks. Use when searching scholarly works/authors/sources, building or debugging OpenAlex queries, extracting results, or downloading available PDFs using OPENALEX_API_KEY.
testing
Comprehensive open data quality validator for two audiences: data analysts who need to assess whether a dataset is ready to use, and public administrations who want to self-evaluate their published data. Automatically adapts based on input type: (A) local CSV file only — performs file-level structural and content checks; (B) CKAN/open data portal dataset — adds metadata completeness, resource accessibility, URL reachability, and DCAT-AP compliance (supports all national profiles: DCAT-AP 2.x baseline, IT, BE, NL, DE, FR, UK, ES, and others). Always use this skill when the user mentions: data quality, validate dataset, check CSV, open data compliance, metadata audit, CKAN dataset review, "is this data usable?", or whenever a CSV file or CKAN dataset ID/URL is provided for quality assessment. Produces severity-ranked reports (blocker / major / minor) with concrete fixes, quality score, and a plain-language summary for non-technical stakeholders.