Skip to content

Repository files navigation

📊 Data Science & SQL Engineering Portfolio Suite

Python MySQL Scikit-Learn Streamlit Docker License

A unified Data Science, Relational Database & NLP Engineering Suite demonstrating the end-to-end data lifecycle: from Enterprise Database Design (35 normalized tables, views, stored procedures, triggers) to Predictive Machine Learning Modeling, NLP Text Classification, and Production API Microservices with Automated CI/CD.


🧭 Systems Overview & Capability Matrix

Module Core Domain Technologies Core Concepts & Techniques Deliverables & Live Links
1-machine-learning-projects Predictive Modeling & EDA Scikit-Learn, Pandas, NumPy, Seaborn, Matplotlib • Feature engineering & cross-validation
• Regression (Car price valuation)
• Time-series & demographic EDA (Unemployment)
• Multi-class classification (Iris flower)
Documented Jupyter Notebooks with publication-ready plots
2-nlp-spam-detector-streamlit Natural Language Processing (NLP) Python, NLTK, TF-IDF, Naive Bayes / SVM, Streamlit • Text normalization, stopword filtering & vectorization
• High-precision binary spam classification
• Real-time web inference dashboard
🌐 Live Streamlit App
3-retail-ecommerce-database Enterprise Relational Database Design MySQL, Relational Algebra, ERD, SQL DDL/DML • 35 normalized tables (3NF / BCNF)
• Complex window functions, CTEs & multi-table joins
• Automated triggers, auditing logs & stored procedures
• ACID transaction integrity
Production SQL scripts, ERD schemas & analytical query suite
4-emotion-detector-microservice Containerized NLP Microservice Flask, IBM Watson NLU, Pytest, Docker, GitHub Actions • Emotion scoring (joy, anger, sadness, fear, disgust)
• Keyword fallback heuristic engine
• REST API endpoints + HTML UI bars
• Automated CI/CD test pipeline & Dockerization
Docker container, JSON API & GitHub Actions CI

📂 Suite Directory Structure

data-science-and-sql-suite/
├── .gitignore
├── .gitattributes
├── LICENSE
├── README.md                                # Suite master documentation
│
├── 1-machine-learning-projects/             # Module 1: Exploratory Data Analysis & ML
│   ├── iris-flower-classification/          # Multi-class classification (KNN, Decision Trees)
│   ├── unemployment-analysis/               # Economic macro analysis & seasonal trends
│   └── car-price-prediction/                # Regression models & feature correlation
│
├── 2-nlp-spam-detector-streamlit/           # Module 2: Production NLP Web Application
│   ├── app/                                 # Streamlit UI & inference scripts
│   ├── dataset/                             # SMS / Email labeled text corpora
│   ├── Email_Spam_Detection.ipynb           # Model training, vectorization & evaluation
│   └── README.md
│
├── 3-retail-ecommerce-database/             # Module 3: Enterprise MySQL Relational Architecture
│   ├── database/                            # Schema definitions (35 normalized tables)
│   ├── queries/                             # Complex analytic queries, joins & aggregates
│   ├── advanced/                            # Stored procedures, triggers, views & indexing
│   ├── diagrams/                            # Entity Relationship Diagrams (ERD)
│   └── README.md                            # Comprehensive database documentation
│
└── 4-emotion-detector-microservice/         # Module 4: Containerized Flask NLP API & CI
    ├── app.py / wsgi.py                     # Flask application entry point
    ├── src/                                 # Watson NLU client & fallback heuristic engine
    ├── tests/                               # Pytest unit & integration test suite
    ├── Dockerfile                           # Production container specification
    ├── .github/workflows/                   # Automated GitHub Actions test pipeline
    └── README.md

🔬 In-Depth Module Highlights

1. 🏬 Retail & E-Commerce Management Database (3-retail-ecommerce-database)

Designed to mirror enterprise retail inventory, fulfillment, and customer management operations:

  • 35 Tables in 3NF/BCNF: Segregating orders, inventory batches, suppliers, customer tiers, shipments, and discount structures.
  • Advanced Stored Procedures & Triggers: Automated re-order triggers when stock breaches thresholds, real-time inventory locking, and audit logs.
  • Business Intelligence Analytics: Monthly recurring revenue, customer cohort lifetime value (LTV), inventory turnover velocity, and cart abandonment metrics.

2. 🛡️ NLP Email & SMS Spam Detector (2-nlp-spam-detector-streamlit)

  • End-to-End NLP Pipeline: Raw text cleaning, punctuation removal, tokenization, stemming/lemmatization, and TF-IDF matrix representation.
  • Production Web Interface: Deployed on Streamlit Cloud, allowing users to paste any email or message to receive real-time confidence scores and spam probabilities.

3. 🧠 Emotion Detection Service (4-emotion-detector-microservice)

  • Dual-Engine Architecture: Integrates with IBM Watson NLU for contextual sentiment and emotion classification, with an automated keyword fallback for offline reliability.
  • Production Engineering: Includes automated test suites run through pytest, linting configurations, Docker build scripts, and GitHub Actions CI.

⚡ Quick Start Guide

Running the NLP Spam Detector (Streamlit)

cd 2-nlp-spam-detector-streamlit
pip install -r app/requirements.txt   # or streamlit pandas scikit-learn
streamlit run app/app.py

Running the Emotion Detection Microservice (Flask / Docker)

cd 4-emotion-detector-microservice
# Run directly:
pip install -r requirements.txt
python app.py

# Or run with Docker:
docker build -t emotion-detector .
docker run -p 5000:5000 emotion-detector

Loading the E-Commerce SQL Database (MySQL)

cd 3-retail-ecommerce-database
mysql -u root -p < database/schema.sql
mysql -u root -p < database/sample_data.sql

👤 Author

Muhammad Danish


📄 License

This project is open-source under the MIT License.

About

A unified Data Science, Machine Learning & Relational Database Engineering Suite featuring 35-table MySQL schema, NLP spam classifier, emotion analysis API, and predictive analytics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages