🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

openclaw ggsql

by @fanzhidongyzby

Generate charts from tabular data using ggsql SQL syntax extension. Use when: user wants to visualize data as charts without Python/R. Supports: scatter plot...

Versionv1.0.0
⚑ When to Use
TriggerAction
- "Visualize this data as a scatter plot"
- "Create a histogram of X"
- "Draw a bar chart comparing Y across categories"
- "Plot time series data"
- "Generate heatmap from table"
- User provides tabular data and wants a chart
πŸ’‘ Examples

Example 1: Scatter Plot with Color

Input:

data: penguins.csv
chart_type: point
mapping:
  x: bill_length_mm
  y: bill_depth_mm
  fill: species
options:
  title: Penguin Bill Dimensions
  x_label: Bill Length (mm)
  y_label: Bill Depth (mm)

Generated SQL:

SELECT * FROM 'penguins.csv'
VISUALISE bill_length_mm AS x, bill_depth_mm AS y, species AS fill
DRAW point
LABEL
  title => 'Penguin Bill Dimensions',
  x => 'Bill Length (mm)',
  y => 'Bill Depth (mm)'

Example 2: Histogram

Input:

data: sales.csv
chart_type: histogram
mapping:
  x: revenue
options:
  title: Revenue Distribution
  binwidth: 1000

Generated SQL:

SELECT * FROM 'sales.csv'
VISUALISE revenue AS x
DRAW histogram
  SETTING binwidth => 1000
LABEL title => 'Revenue Distribution'

Example 3: Faceted Scatter Plot

Input:

data: penguins.csv
chart_type: point
mapping:
  x: bill_length_mm
  y: bill_depth_mm
  fill: species
options:
  title: Penguins by Island
  facet: island

Generated SQL:

SELECT * FROM 'penguins.csv'
VISUALISE bill_length_mm AS x, bill_depth_mm AS y, species AS fill
DRAW point
FACET island
LABEL title => 'Penguins by Island'

Example 4: Multi-layer Chart

Input:

data: sales.csv
chart_type: multi
mapping:
  x: date
  y: revenue
  group: region
options:
  title: Revenue Trend by Region

Generated SQL:

SELECT * FROM 'sales.csv'
VISUALISE date AS x, revenue AS y
DRAW line
  MAPPING region AS color
DRAW point
  MAPPING region AS fill
LABEL title => 'Revenue Trend by Region'

πŸ“‹ Tips & Best Practices

  • ggsql is in alpha stage (v0.2.7), syntax may evolve
  • WASM Playground is the easiest way to test
  • No Python/R environment needed
  • Charts are static (SVG/PNG), not interactive
  • Grammar of Graphics philosophy: compose from layers, scales, coordinates
  • View on ClawHub
    TERMINAL
    clawhub install openclaw-ggsql

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’