Secure, Offline, CPU-Optimized Data Intelligence
A comprehensive data analysis and visualization platform powered by local AI, with advanced ML models for forecasting, anomaly detection, and clustering.
- Features
- Project Overview
- Quick Start
- Installation
- Project Structure
- Core Modules
- Configuration
- Usage Guide
- Testing
- Documentation
- Troubleshooting
- Multi-file Support: Upload and analyze multiple CSV/Excel files simultaneously
- Auto Schema Detection: Automatic detection of data types, date columns, and numeric fields
- Data Validation: Comprehensive validation before analysis with detailed error reporting
- Data Sampling: Intelligent sampling for large datasets (supports 200K+ rows)
- Time Series Forecasting: ARIMA-based predictions with configurable forecast periods
- Anomaly Detection: Isolation Forest algorithm to identify outliers and unusual patterns
- Clustering Analysis: K-Means clustering with automatic cluster determination via elbow method
- Trend Analysis: Change point detection and growth metrics calculation
- Statistical Analytics: Comprehensive statistical summaries and trend metrics
- Interactive Charts: Plotly-powered interactive visualizations
- Trend Analysis Plots: Time series trends with forecast overlays
- Category Comparisons: Bar charts and comparative analytics
- Cluster Visualization: 2D cluster plots, distribution charts, and pie charts
- Elbow Curves: Visual optimization for cluster selection
- Local LLM Integration: Ollama-based text generation for AI insights
- Automated Analysis: AI-generated insights based on data characteristics
- Natural Language Reports: Readable, contextual analysis summaries
- Offline Processing: All AI operations run locally for privacy and security
- Streamlit Framework: Responsive, modern web interface
- Sidebar Navigation: Intuitive workflow with sequential analysis steps
- Real-time Feedback: Progress indicators and status updates
- Download Reports: Export analysis results and visualizations
DataAADHAR is a lightweight, privacy-first data analysis platform designed for:
- Organizations requiring offline data processing
- Users prioritizing data privacy and security
- Teams needing rapid data insights without cloud dependencies
- Researchers and analysts working with time series data
The platform combines traditional statistical methods with modern machine learning to provide comprehensive data intelligence.
- Python 3.8+
- Ollama (for AI insights) - Install Ollama
- pip (Python package manager)
# 1. Clone or navigate to project directory
cd "f:\Git floder(Project)\Antigravity projects\DataAADHAR"
# 2. Create virtual environment
python -m venv .venv
# 3. Activate virtual environment
.venv\Scripts\Activate.ps1
# 4. Install dependencies
pip install -r requirements.txt
# 5. Start Ollama service (in another terminal)
ollama serve
# 6. Run the application
streamlit run app.pyThe application will open in your browser at http://localhost:8501
# Navigate to project directory
cd "f:\Git floder(Project)\Antigravity projects\DataAADHAR"
# Create virtual environment
python -m venv .venv
# Activate virtual environment (Windows)
.venv\Scripts\Activate.ps1
# On macOS/Linux:
# source .venv/bin/activate# Upgrade pip first
python -m pip install --upgrade pip
# Install all requirements
pip install -r requirements.txtKey Dependencies:
pandas- Data manipulation and analysisnumpy- Numerical computingscikit-learn- Machine learning algorithmsstatsmodels- Statistical modelingpmdarima- Auto ARIMA forecastingstreamlit- Web application frameworkplotly- Interactive visualizationsrequests- HTTP client for Ollama
- Install Ollama: Download from ollama.ai
- Pull a Model:
ollama pull qwen2.5:1.5b-instruct-q4_0
- Start Ollama Server:
The service runs on
ollama serve
http://localhost:11434by default
Create a .env file in the project root:
OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=qwen2.5:1.5b-instruct-q4_0
OLLAMA_TEMPERATURE=0.3
OLLAMA_TIMEOUT=60
# Test Python environment
python -c "import streamlit; print(f'Streamlit {streamlit.__version__}')"
# Test Ollama connectivity
python tests/verify_backend.pyDataAADHAR/
│
├── 📄 app.py # Main Streamlit application
├── 🔧 config.py # Centralized configuration
├── 📋 requirements.txt # Python dependencies
├── .env.example # Environment template
│
├── 📚 docs/ # Documentation
│ ├── guides/ # User guides and setup
│ │ ├── INSTALLATION.md
│ │ ├── QUICKSTART.md
│ │ ├── AI_FEATURES_GUIDE.md
│ │ ├── DATA_VALIDATION_GUIDE.md
│ │ └── CLUSTER_VISUALIZATION_GUIDE.md
│ ├── reports/ # Analysis reports
│ │ ├── IMPLEMENTATION_REPORT.md
│ │ ├── CODE_IMPROVEMENTS.md
│ │ └── ANALYSIS_SUMMARY_FOR_REPORT.md
│ ├── architecture/
│ │ └── SYSTEM_ARCHITECTURE_DIAGRAM.txt
│ └── FILE_MANIFEST.md # File inventory
│
├── 📊 ingestion/ # Data loading
│ └── loader.py # File format handlers
│
├── 🔍 schema/ # Schema analysis
│ └── analyzer.py # Data type detection
│
├── ⚙️ decision_engine/ # Analysis routing
│ └── rules.py # Auto-selection logic
│
├── 🤖 ml_models/ # Machine learning algorithms
│ ├── forecasting.py # ARIMA forecasting
│ ├── anomaly.py # Anomaly detection
│ ├── clustering.py # K-Means clustering
│ ├── analytics.py # Statistical analysis
│ └── __pycache__/
│
├── 📈 visualization/ # Data visualization
│ └── plots.py # Plotly visualizations
│
├── 🧠 llm/ # LLM integration
│ ├── ollama_client.py # Ollama API client
│ └── exceptions.py # LLM exceptions
│
├── ✅ utils/ # Utility functions
│ ├── data_validator.py # Data validation
│ ├── validators.py # Validation schemas
│ ├── logger.py # Logging utilities
│ └── __pycache__/
│
├── 🧪 tests/ # Test suite
│ ├── test_data_validation.py
│ ├── test_clustering_speed.py
│ ├── test_pie_chart.py
│ └── verify_backend.py
│
├── 📂 data/ # Data storage
│ └── uploads/ # User-uploaded files
│
└── 📝 logs/ # Application logs
Handles multiple file formats:
- CSV files with custom delimiters
- Excel workbooks (
.xlsx,.xls) - Chunked loading for large files
from ingestion.loader import load_file
df = load_file(uploaded_file)Auto-detects data characteristics:
- Column data types (numeric, categorical, datetime)
- Date column identification
- Numeric column detection
- Statistical summaries
from schema.analyzer import analyze_schema
schema = analyze_schema(df)Intelligent analysis routing:
- Suggests applicable analyses based on data structure
- Evaluates numeric vs categorical data
- Determines forecasting suitability
from decision_engine.rules import decide_analysis
recommendations = decide_analysis(schema)ARIMA-based time series prediction:
from ml_models.forecasting import perform_forecast
forecast_df = perform_forecast(df, date_col, value_col, periods=12)Isolation Forest for outlier detection:
from ml_models.anomaly import detect_anomalies
anomalies_df = detect_anomalies(df, contamination=0.1)K-Means clustering with automatic optimization:
from ml_models.clustering import perform_clustering
result = perform_clustering(df, numeric_cols, max_clusters=10)Statistical analysis and trend detection:
from ml_models.analytics import calculate_trend_metrics, detect_change_points
metrics = calculate_trend_metrics(df, date_col, value_col)Interactive Plotly-based charts:
- Trend plots with forecast overlays
- Categorical comparisons
- Cluster 2D plots and distributions
- Elbow curves for cluster optimization
Ollama-based AI insights:
from llm.ollama_client import generate_insights
insights = generate_insights(analysis_data)All settings are centralized in config.py:
OLLAMA_HOST = "http://localhost:11434"
OLLAMA_MODEL_DEFAULT = "qwen2.5:1.5b-instruct-q4_0"
OLLAMA_TEMPERATURE = 0.3
OLLAMA_TIMEOUT = 60MAX_ROWS_FOR_ANALYSIS = 200000
DATA_SAMPLE_SIZE = 10000
ALLOWED_FILE_TYPES = ['csv', 'xlsx', 'xls']# Forecasting
ARIMA_FORECAST_PERIODS = 12
ARIMA_MAX_P, ARIMA_MAX_D, ARIMA_MAX_Q = 2, 2, 2
# Anomaly Detection
ANOMALY_CONTAMINATION = 0.1
# Clustering
CLUSTERING_MAX_CLUSTERS = 10
CLUSTERING_SAMPLE_SIZE = 50000Modify these values to customize behavior for your use case.
-
Upload Data
- Go to "1. Upload Data" in the sidebar
- Select one or more CSV/Excel files
- Files are loaded and validated automatically
-
Explore Schema
- View detected data types
- Identify numeric and categorical columns
- Check for issues in data validation
-
Select Analysis
- Choose from available analyses based on data structure
- Available options: Forecasting, Anomaly Detection, Clustering
-
View Results
- Interactive visualizations
- Statistical summaries
- AI-powered insights
-
Export
- Download analysis results
- Save visualizations
# 1. Prepare a CSV with datetime and numeric columns
# Columns: Date, Sales, Revenue, etc.
# 2. Upload in the app
# 3. Select "Time Series Forecasting"
# 4. Choose date and value columns
# 5. View forecast with confidence intervals# 1. Upload dataset with numeric features
# 2. Select "Anomaly Detection"
# 3. Review flagged outliers
# 4. Understand patterns in anomalous dataRun the test suite to verify functionality:
# Test data validation
python -m pytest tests/test_data_validation.py -v
# Test clustering performance
python -m pytest tests/test_clustering_speed.py -v
# Verify backend connectivity
python tests/verify_backend.py
# Test visualization
python -m pytest tests/test_pie_chart.py -vComprehensive documentation is available in the docs/ directory:
| Document | Purpose |
|---|---|
guides/INSTALLATION.md |
Step-by-step setup with verification |
guides/QUICKSTART.md |
Common tasks and workflows |
guides/AI_FEATURES_GUIDE.md |
LLM integration and AI insights |
guides/DATA_VALIDATION_GUIDE.md |
Data validation rules and checks |
guides/CLUSTER_VISUALIZATION_GUIDE.md |
Clustering analysis guide |
reports/IMPLEMENTATION_REPORT.md |
Technical implementation details |
FILE_MANIFEST.md |
Complete file inventory |
Problem: Failed to connect to Ollama server
Solution:
# 1. Check if Ollama is running
netstat -ano | findstr :11434
# 2. Start Ollama service
ollama serve
# 3. Verify model availability
ollama list
# 4. Test connection
python -c "import requests; print(requests.get('http://localhost:11434/api/tags').status_code)"Problem: ModuleNotFoundError after installation
Solution:
# Verify virtual environment is activated
# (You should see (.venv) in your prompt)
# Reinstall requirements
pip install --force-reinstall -r requirements.txt
# Check installed packages
pip listProblem: Crashes when analyzing 200K+ rows
Solution: Adjust in config.py:
DATA_SAMPLE_SIZE = 5000 # Reduce sample size
CLUSTERING_SAMPLE_SIZE = 25000 # Reduce clustering sampleProblem: Port 8501 is already in use
Solution:
# Run on different port
streamlit run app.py --server.port 8502- Offline Processing: All analysis happens locally
- No Data Upload: Data never leaves your machine
- Local LLM: AI insights generated via local Ollama instance
- Open Source: Code is transparent and auditable
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For issues, questions, or suggestions:
- Check the
docs/directory for detailed guides - Review existing test cases in
tests/ - Open an issue on GitHub
- Multi-language support
- Advanced deep learning models
- GPU acceleration support
- Cloud deployment options
- REST API interface
- Advanced report generation
- Real-time data streaming
Built with ❤️ for data privacy and local intelligence
Last Updated: January 2026