Jadawel-ai-analysis / README.md
Jadawel AI Analysis
Jadawel AI Analysis
Jadawel AI Analysis is a powerful data analysis tool that leverages OpenAI's GPT models and LangChain to provide AI-powered data visualization and dashboard creation through an intuitive Streamlit interface.
Features
- AI-Powered Dashboard Creation: Generate complete dashboards with a single natural language query
- Automated Chart Generation: Create three complementary visualizations based on your data needs
- Interactive Visualizations: All charts are interactive and responsive using Plotly
- Detailed Chart Reports: Each visualization includes an analysis of input data and key observations
- Data Wrangling Agent: Automatically prepares and processes your data for visualization
- Data Visualization Agent: Creates professional, customized visualizations from your instructions
- Support for Various File Formats: Upload and analyze data from CSV and Excel files
Dashboard Examples
Data Analysis Interface
The data upload and preview interface, allowing users to load CSV/Excel files and generate dashboards.
Business Analytics Dashboard
Example of a business dashboard showing yearly sales trends, marketing spend distribution by product, and net profit by product.
Chart Reports
Detailed reports for each chart showing input data analysis and key insights extracted from the visualizations.
How It Works
The application uses three main components:
- PandasDataAnalyst: Coordinates the data processing and visualization pipeline
- DataWranglingAgent: Cleans and prepares the data for analysis
- DataVisualizationAgent: Creates Plotly visualizations based on the processed data
When you enter a dashboard query, the system:
- Breaks down your request into three complementary chart instructions
- Processes each instruction through the AI agents
- Generates and displays the three charts in a dashboard layout
- Provides an insightful report for each chart showing:
- Input columns/features used in the chart with explination
- Key observations and insights from the visualization
Prerequisites
- OpenAI API key
- (For local install only) Python 3.10+
Running with Docker (Recommended)
- Clone the repository:
git clone https://github.com/rihal-om/ai-analysis.git
cd jadawel-ai-analysis
-
Set up your
.envfile:- Copy the provided
.envfile or create one with yourOPENAI_API_KEY(see example below):OPENAI_API_KEY=sk-... - Do not commit your
.envfile to version control.
- Copy the provided
-
Build and run the app with Docker Compose:
docker-compose up --build
-
Access the app:
- Open your browser and go to http://localhost:8501
-
Usage:
- Enter your OpenAI API key in the sidebar (if not set in
.env) - Select an OpenAI model (default: gpt-4o-mini)
- Upload your data (CSV or Excel format)
- Enter a dashboard query describing what kind of visualizations you want to create
- Click "Generate Dashboard" to create a 3-chart dashboard based on your query
- Expand the "Chart X Report" sections under each visualization to see detailed information about:
- What data was used to create the chart
- Important insights and patterns revealed by the visualization
- Enter your OpenAI API key in the sidebar (if not set in
Local Installation (without Docker)
- Install Python 3.10+
- Install the required dependencies:
pip install -r requirements.txt
pip install git+https://github.com/business-science/ai-data-science-team.git --upgrade
- Start the Streamlit application:
streamlit run app.py
- Access the web interface at
http://localhost:8501
Data Format
The application supports:
- CSV files (.csv)
- Excel files (.xlsx, .xls)
File size limit: 200MB
Example Queries
Dashboard Queries
- "I want yearly trend for sales revenue, pie for product name with marketing spend, and bar chart for product name with net profit"
- "Create a dashboard showing sales trends, top products, and regional performance"
- "Make a dashboard with monthly revenue, customer segments, and product categories"
- "Generate charts for year-over-year growth, top customers, and sales by region"
Project Structure
app.py: Main application code with Streamlit interfacedata/: Directory containing sample datasetsProducts_export 1.xlsx: Sample Excel data