Spaces:
Sleeping
Sleeping
metadata
title: SCoDA
emoji: π¨
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 6.5.1
app_file: app.py
pinned: false
license: mit
CoDA: Collaborative Data Visualization Agents
A production-grade multi-agent system for automated data visualization from natural language queries.
Overview
CoDA reframes data visualization as a collaborative multi-agent problem. Instead of treating it as a monolithic task, CoDA employs specialized LLM agents that work together:
- Query Analyzer - Interprets natural language and extracts visualization intent
- Data Processor - Extracts metadata without token-heavy data loading
- VizMapping Agent - Maps semantics to visualization primitives
- Search Agent - Retrieves relevant code patterns
- Design Explorer - Generates aesthetic specifications
- Code Generator - Synthesizes executable Python code
- Debug Agent - Executes code and fixes errors
- Visual Evaluator - Assesses quality and triggers refinement
Quick Start
Installation
# Clone the repository
git clone https://github.com/yourusername/CoDA.git
cd CoDA
# Install dependencies
pip install -r requirements.txt
# Configure API key
cp .env.example .env
# Edit .env and add your GROQ_API_KEY
Usage
Web Interface (Gradio)
python app.py
Open http://localhost:7860 in your browser.
Command Line
python main.py --query "Create a bar chart of sales by category" --data sales.csv
Options:
-q, --query: Visualization query (required)-d, --data: Data file path(s) (required)-o, --output: Output directory (default: outputs)--max-iterations: Refinement iterations (default: 3)--min-score: Quality threshold (default: 7.0)
Python API
from coda.orchestrator import CodaOrchestrator
orchestrator = CodaOrchestrator()
result = orchestrator.run(
query="Show sales trends over time",
data_paths=["sales_data.csv"]
)
if result.success:
print(f"Visualization saved to: {result.output_file}")
print(f"Quality Score: {result.scores['overall']}/10")
Hugging Face Spaces Deployment
- Create a new Space on Hugging Face
- Select "Gradio" as the SDK
- Upload all files from this repository
- Add
GROQ_API_KEYas a Secret in Space Settings - The Space will automatically build and deploy
Architecture
Natural Language Query + Data Files
β
βΌ
βββββββββββββββββ
β Query Analyzer β βββ Extracts intent, TODO list
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
β Data Processor β βββ Metadata extraction (no full load)
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
β VizMapping β βββ Chart type, encodings
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
β Search Agent β βββ Code examples
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βDesign Explorerβ βββ Colors, layout, styling
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βCode Generator β βββ Python visualization code
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
β Debug Agent β βββ Execute & fix errors
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βVisual Evaluatorβ βββ Quality assessment
βββββββββββββββββ
β
ββββββββ΄βββββββ
β Feedback Loop β
(if quality < threshold)
Configuration
Environment variables (in .env):
| Variable | Default | Description |
|---|---|---|
GROQ_API_KEY |
Required | Your Groq API key |
CODA_DEFAULT_MODEL |
llama-3.3-70b-versatile | Text model |
CODA_VISION_MODEL |
llama-3.2-90b-vision-preview | Vision model |
CODA_MIN_OVERALL_SCORE |
7.0 | Quality threshold |
CODA_MAX_ITERATIONS |
3 | Max refinement loops |
Supported Data Formats
- CSV (
.csv) - JSON (
.json) - Excel (
.xlsx,.xls) - Parquet (
.parquet)
Requirements
- Python 3.10+
- Groq API key (Get one free)
License
MIT License - See LICENSE for details.
Citation
If you use CoDA in your research, please cite:
@article{chen2025coda,
title={CoDA: Agentic Systems for Collaborative Data Visualization},
author={Chen, Zichen and Chen, Jiefeng and Arik, Sercan {\"O}. and Sra, Misha and Pfister, Tomas and Yoon, Jinsung},
journal={arXiv preprint arXiv:2510.03194},
year={2025},
url={https://arxiv.org/abs/2510.03194},
doi={10.48550/arXiv.2510.03194}
}
Paper: arXiv:2510.03194