Skip to main content

Graph Insights Command

Generate financial insight visualizations from CSV data.

Arguments

  • $1: Path to a CSV file (merged or cumulative transactions)

Output

PNG files in the assets/ subdirectory of the CSV's parent folder.

Graph Types

Required Standard Graphs

  1. Balance Over Time - Line chart showing balance progression
  2. Category Breakdown - Pie chart of spending by category
  3. Monthly Spending Trend - Bar chart by category
  4. Income vs Expenses - Comparison bar chart
  5. Top Merchants - Horizontal bar chart

Novel/Interesting Graphs

  1. Daily Spending Pattern - Heatmap by day of week
  2. Category Trend Lines - Multi-line chart over time
  3. Savings Rate - (income - spending) / income
  4. Large Transaction Highlights - Scatter plot outliers
  5. Recurring vs One-time - Stacked area chart

Graph Requirements

Visual Quality

  • Clean matplotlib style
  • Clear titles and axis labels
  • Readable font sizes (min 10pt)
  • Color-blind friendly palettes
  • Figure size: minimum 10x6 inches
  • Resolution: 150 DPI minimum

Data Accuracy

  • All values must be accurate
  • Double-check totals and percentages
  • Handle missing values gracefully

Workflow

  1. Read CSV path from $1
  2. Load and validate data
  3. Generate visualizations using matplotlib/pandas
  4. Save to assets/ directory
  5. Stop hook validates PNG generation

Usage

/finance-graph-insights data/january/agentic_merged_transactions.csv