1 line
3.7 KiB
JSON
1 line
3.7 KiB
JSON
{"repo": "alreshveya-03/ai-data-dashboard", "files": {"README.md": {"19d670ebb9c65afa1a06b5e39ca9d9172f6b5fd3": {"t": 1785596408.1782002, "n": 3323, "h": "ad26029397817753", "c": "# 📊 AI Data Analyst Dashboard\n\nA fully self-contained Streamlit dashboard that analyzes any CSV file instantly —\nwith auto-generated charts, insights, anomaly detection, and an AI Q&A feature.\n\n---\n\n## 🚀 Quick Start\n\n### 1. Clone / Download the project\n```bash\ncd ai-data-dashboard\n```\n\n### 2. Install dependencies\n```bash\npip install -r requirements.txt\n```\n\n### 3. (Optional) Set OpenAI API key for AI-powered answers\n```bash\nexport OPENAI_API_KEY=\"sk-...\" # macOS / Linux\nset OPENAI_API_KEY=sk-... # Windows CMD\n$env:OPENAI_API_KEY=\"sk-...\" # Windows PowerShell\n```\n> **No API key needed.** All features work with smart rule-based logic as a fallback.\n\n### 4. Run the app\n```bash\nstreamlit run app.py\n```\n\nThe dashboard opens at **http://localhost:8501**\n\n---\n\n## 📁 Project Structure\n\n```\nai-data-dashboard/\n│\n├── app.py ← Main Streamlit UI (entry point)\n├── data_loader.py ← CSV loading & validation\n├── analysis.py ← Summary stats & missing value detection\n├── visualization.py ← Plotly chart generators\n├── insights.py ← Rule-based human-readable insights\n├── llm_helper.py ← OpenAI integration + rule-based NL Q&A fallback\n├── anomaly.py ← IQR & Z-Score anomaly detection\n├── utils.py ← Shared utility functions\n├── requirements.txt ← Python dependencies\n└── README.md ← This file\n```\n\n---\n\n## 🎯 Features\n\n| Feature | Description |\n|---|---|\n| **File Upload** | Upload any CSV; auto-parsed and previewed |\n| **Data Preview** | First 10 rows + column info table |\n| **Summary Stats** | Mean, median, std, skewness, variance per column |\n| **Missing Values** | Count and % of nulls per column |\n| **Auto Insights** | Rule-based trend, correlation, and distribution insights |\n| **Line Chart** | Time-series / sequential data |\n| **Bar Chart** | Grouped/categorical comparisons |\n| **Histogram** | Numeric distribution per column |\n| **Explain Chart** | Button generates an explanation of the current chart |\n| **NL Query** | Ask questions like \"Which month had highest sales?\" |\n| **Anomaly Detection** | IQR or Z-Score with highlighted scatter plot |\n| **Column Filter** | Sidebar: select which columns to analyze |\n| **CSV Download** | Download cleaned/filtered dataset |\n\n---\n\n## 💬 Example Questions to Ask\n\n- \"Which row has the highest sales?\"\n- \"What is the average revenue?\"\n- \"How many missing values are there?\"\n- \"Show me the trend for profit\"\n- \"What are the column names?\"\n\n---\n\n## 🔑 OpenAI Integration\n\nWhen `OPENAI_API_KEY` is set, the dashboard uses **GPT-3.5-Turbo** for:\n- Natural language Q&A (more nuanced answers)\n- Chart explanations\n\nWithout the key, all features still work via built-in rule-based logic.\n\n---\n\n## 🧪 Testing with Sample Data\n\nNo data? Try this quick sample CSV (copy to `sample.csv`):\n\n```\nmonth,sales,revenue,customers\nJanuary,12000,45000,320\nFebruary,14500,52000,380\nMarch,9800,35000,275\nApril,18000,63000,450\nMay,21000,74000,510\nJune,25000,89000,620\nJuly,23000,81000,580\nAugust,19000,67000,490\nSeptember,22000,78000,540\nOctober,28000,95000,670\nNovember,31000,108000,740\nDecember,35000,125000,820\n```\n\n---\n\n## ⚙️ Configuration\n\nEdit these in `llm_helper.py`:\n- `model`: Default is `gpt-3.5-turbo` (change to `gpt-4` for better answers)\n- `max_tokens`: Default is 400\n\n---\n\n\n"}}}} |