A powerful visualization tool that combines OpenAI's O1 for planning and Claude 3.5 Sonnet for code generation. This tool can create various data visualizations based on natural language prompts.
- O1 Model: Creates a detailed execution plan from your prompt
- Claude 3.5 Sonnet: Generates and debugs Python code based on O1's plan
- E2B: Executes the code in a secure sandbox environment
- Output: Generates visualizations and saves them automatically
All code execution runs on e2b for safety. While local execution is possible by modifying code_interpret, it's not recommended.
- Install required dependencies:
pip install -r requirements.txt
Set up your API keys in .env:
- OPENAI_API_KEY=your_openai_key
- ANTHROPIC_API_KEY=your_anthropic_key
- E2B_API_KEY =your_e2b_key (Use .env.sample as a template)
python main.py "Create a visualization of market shares of self-driving vehicle manufacturers in 2022 vs 2023 vs 2024"
Click the "play" button in main.py to run with the default prompt.
Try these example prompts to see different visualization capabilities:
-
Historical Data: Create a visualization of the growth of the Roman empire population and land under its control. Mark every important historical event along the way.
-
Market Analysis: Create a visualization of market shares of self-driving vehicle manufacturers in 2022 vs 2023 vs 2024.
-
Economic Trends: Create a report on the evolution of labor productivity in the United States, and what major technological shifts led to it.
- Generated visualizations are saved in the output/charts directory
- Each prompt creates its own cache file for faster subsequent runs
- Markdown reports with embedded charts are saved in the output directory
📊 Automated chart generation and saving 🔄 Smart caching system (prompt-specific) 📝 Markdown report generation 🎨 Support for various visualization types 🛠 Automatic error handling and code fixes
- Uses OpenAI's O1 model for execution planning
- Uses Claude 3.5 Sonnet for code generation and debugging
- Supports matplotlib, pandas, and other Python visualization libraries
- Secure code execution via e2b sandbox