create_slope_chart
Generate a slope chart to compare rankings between two periods. Green lines indicate gains, red lines show losses, making shifts in census or budget data clear.
Instructions
Slope chart: ranking changes between two periods with connecting lines.
Green=gained rank, red=lost rank.
Ideal for: census ranking 2002→2022, budget share shifts, district reorderings.
Returns: {filepath, title, rows}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Row dicts with entity names and two period values | |
| theme | No | Visual theme | dark |
| title | No | Chart title | |
| top_n | No | Number of entities to show | |
| filename | No | Output filename | slope_chart |
| end_column | Yes | Second period values | |
| start_column | Yes | First period values | |
| entity_column | Yes | Entity/district names |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||