A modern web application that automatically generates insightful visualizations from uploaded datasets using AI and machine learning techniques.
git clone https://github.com/your-username/Data-visualization-platform.git
cd Data-visualization-platform
# Pull pre-built images from Docker Hub
docker pull sri235/dataviz-backend:latest
docker pull sri235/dataviz-frontend:latest
docker pull ollama/ollama:latest
# Start all services
docker-compose upApp available at http://localhost
No build required — all images are pulled from Docker Hub:
sri235/dataviz-backend:latestsri235/dataviz-frontend:latestollama/ollama:latest(official image)
First run downloads the Llama model (~2GB) into a Docker volume. Subsequent runs use the cached volume.
# Backend
cd backend
pip install -r requirements.txt
python main.py
# Frontend (separate terminal)
cd frontend
npm install
npm run devBackend runs at http://localhost:5000, Frontend at http://localhost:5173
- Automatic data cleaning and preprocessing
- AI-powered visualization code generation via Ollama LLM
- Interactive visualizations using Plotly and Matplotlib
- Support for CSV and Excel files
- Modern, responsive UI with Material-UI and TailwindCSS
- Real-time data processing
- Feature importance rankings via PCA analysis
- Python / Flask
- Ollama (primary LLM) — HuggingFace Transformers (fallback)
- Pandas, NumPy, Scikit-learn
- Matplotlib, Seaborn, Plotly
- ChromaDB + SentenceTransformers (RAG)
- React
- Material-UI + TailwindCSS
- Plotly.js
- Axios
- Docker + Docker Compose
- Nginx (reverse proxy)
- Ollama (LLM serving)
| Variable | Default | Description |
|---|---|---|
OLLAMA_HOST |
http://localhost:11434 |
Ollama server URL |
OLLAMA_MODEL |
llama3.2:3b |
Model to use |
FLASK_ENV |
production |
Flask environment |
-
Clone the repository:
git clone https://github.com/your-username/Data-visualization-platform.git cd Data-visualization-platform -
Start all services:
docker-compose up
First run downloads the Llama model (~2GB). Subsequent runs use the cached volume.
-
Access the app at http://localhost
-
Stop services:
docker-compose down
docker-compose up --buildOr rebuild and push individual services:
# Backend
docker build -f backend/Dockerfile -t sri235/dataviz-backend:latest .
docker push sri235/dataviz-backend:latest
# Frontend
docker build -f frontend/Dockerfile -t sri235/dataviz-frontend:latest .
docker push sri235/dataviz-frontend:latest-
Install and start Ollama:
ollama pull llama3.2:3b
-
Backend setup:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt python main.py
-
Frontend setup:
cd frontend npm install npm run dev -
Open
http://localhost:5173
- Open the app in your browser
- Click "Get Started" or navigate to the Upload page
- Upload your CSV or Excel file
- Wait for the AI to process your data
- View the generated visualizations on the Results page
- Ask natural language questions to generate custom visualizations
Data-visualization-platform/
├── docker-compose.yml # Docker orchestration
├── .dockerignore # Docker build exclusions
├── backend/ # Flask Backend
│ ├── Dockerfile # Backend container build
│ ├── main.py # Flask API entry point
│ ├── requirements.txt # Python dependencies
│ ├── utils/
│ │ ├── llm_service.py # Ollama / HuggingFace LLM
│ │ ├── rag_service.py # ChromaDB + embeddings
│ │ ├── code_executor.py # Sandboxed code execution
│ │ ├── feature_analysis.py # Feature analysis + PCA
│ │ └── dataset_preprocessing.py
│ └── models/ # HuggingFace model cache (local dev only)
├── frontend/ # React Frontend
│ ├── Dockerfile # Frontend container build
│ ├── nginx.conf # Nginx reverse proxy config
│ ├── src/
│ │ ├── components/ # UI Components
│ │ ├── pages/ # App Pages
│ │ ├── App.jsx # Main app component
│ │ └── main.jsx # Entry point
│ ├── package.json
│ └── vite.config.js # Vite dev server + proxy
└── README.md
User Browser → Nginx (port 80) → Flask API (port 5000) → Ollama (port 11434)
│ │ │
Serves SPA REST endpoints LLM inference
Proxies /api Code generation llama3.2:3b
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/upload |
Upload and analyze a dataset |
POST |
/api/query |
Generate visualization from natural language |
GET |
/api/datasets |
List all loaded datasets |
GET |
/api/visualizations/<id> |
Regenerate visualizations for a dataset |
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request