create_sankey_diagram
Generate a Sankey (alluvial) diagram to visualize flow magnitudes between source and target categories. Ideal for budget, energy, or migration flow analysis.
Instructions
Sankey (alluvial) diagram showing flow between categories.
Ideal for: budget flow (revenue→ministry→spending), energy distribution, migration flows, supply chains.
Returns: {filepath, title, flows}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data": "<data>",
"source_column": "<source_column>",
"target_column": "<target_column>",
"value_column": "<value_column>"
},
"name": "create_sankey_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Row dicts with source, target, and flow value | |
| theme | No | Visual theme | dark |
| title | No | Chart title | |
| filename | No | Output filename | sankey |
| value_column | Yes | Flow magnitude | |
| source_column | Yes | Source/origin category | |
| target_column | Yes | Target/destination category |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||