Skip to content

Repository files navigation

Header

Typing SVG


CHANAKYA Logo

Live App GitHub LinkedIn


Python MySQL PowerBI TensorFlow Streamlit Groq Scikit-learn


πŸ€” What if you could build an entire Data Science ecosystem from scratch?

No Kaggle datasets. No YouTube tutorials. No shortcuts.

Just raw Python, real business logic, and 12 layers of pure Data Science.

That's CHANAKYA β€” a 100% original end-to-end AI Commerce Intelligence Platform built on a synthetically generated Indian e-commerce dataset with real brands, real cities, real business patterns.

πŸ’‘ "Most people download a dataset. I built one."


πŸ“Š The Numbers Speak

πŸ›’ Orders πŸ‘₯ Customers πŸ’° Revenue πŸ“¦ Products πŸ™οΈ Cities
5,010 1,000 β‚Ή2.67 Crore 50 Indian Brands 28 Cities

πŸ—οΈ 12 Layers of Pure Data Science

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     CHANAKYA ECOSYSTEM                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ L1   β”‚ Data Source + Simulation β”‚ 5,010 live orders         β”‚
β”‚ L2   β”‚ ETL Pipeline             β”‚ Production-grade logging  β”‚
β”‚ L3   β”‚ SQL Data Warehouse       β”‚ Star Schema + 7 queries   β”‚
β”‚ L4   β”‚ EDA                      β”‚ 16 professional charts    β”‚
β”‚ L5   β”‚ RFM Segmentation         β”‚ 9 segments + animation 🎬 β”‚
β”‚ L6   β”‚ Anomaly Detection        β”‚ 34 frauds caught          β”‚
β”‚ L7   β”‚ ML Demand Forecasting    β”‚ Gradient Boosting wins    β”‚
β”‚ L8   β”‚ Deep Learning LSTM       β”‚ Time series forecasting   β”‚
β”‚ L9   β”‚ Churn Prediction         β”‚ 477 at-risk customers     β”‚
β”‚ L10  β”‚ Power BI Dashboard       β”‚ Dark theme + DAX measures β”‚
β”‚ L11  β”‚ ARTHA Agentic AI         β”‚ LLaMA 3.3 70B via Groq    β”‚
β”‚ L12  β”‚ Streamlit Deployment     β”‚ Live on the internet      β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ–₯️ Streamlit Live App

CHANAKYA Streamlit Dashboard


πŸ€– ARTHA β€” Agentic AI with Auto Visualizations

Named after Kautilya's Arthashastra β€” the ancient treatise on wealth and governance

ARTHA doesn't just answer questions. It thinks, analyzes, and visualizes β€” all in real time.

ARTHA AI


πŸ“Š Power BI Executive Dashboard

Dark theme | 6 KPIs | 5 Visuals | 7 DAX Measures | 3 Interactive Slicers

Power BI Dashboard


πŸ“ˆ Layer 4 β€” Exploratory Data Analysis

16 professional charts revealing real business insights

Revenue Analysis Customer Analysis Order Analysis Product Analysis


🎬 Layer 5 β€” RFM Customer Segmentation

9 customer segments | Animated visualization

RFM Animated RFM Segments


🚨 Layer 6 β€” Anomaly Detection

34 fraud accounts caught using Z-Score + Isolation Forest

Revenue Anomaly Isolation Forest


πŸ€– Layer 7 β€” ML Demand Forecasting

4 models compared | Gradient Boosting wins with R2: 0.2891

ML Forecasting

Linear Regression    β†’ R2: 0.2652
Decision Tree        β†’ R2: 0.0780
Random Forest        β†’ R2: 0.2522
Gradient Boosting    β†’ R2: 0.2891 βœ… WINNER

πŸ“ R2 scores are moderate due to limited monthly data (37 points). In production with daily transaction data, accuracy will significantly improve. This demonstrates honest ML evaluation β€” not overfitting to small datasets.


🧠 Layer 8 β€” Deep Learning LSTM

Time series revenue forecasting with TensorFlow

LSTM Forecasting


πŸ“‰ Layer 9 β€” Churn Prediction

477 at-risk customers identified | Data leakage detected & fixed

Churn Prediction

v1 with days_since_last  β†’ 100% accuracy ❌ (LEAKAGE!)
v2 without leakage       β†’ 67% accuracy  βœ… (HONEST)

πŸ’‘ Key Business Insights

πŸ“ˆ  Electronics drives 75% revenue β€” but has the LOWEST profit margin
πŸ†  129 Champion customers generate β‚Ή83.4L β€” top 13% = 31% revenue
⚠️  34 fraud accounts detected using Z-Score + Isolation Forest
πŸ“‰  477 customers predicted to churn β€” before they actually left
🎯  November is peak month β€” festive season spike clearly visible
πŸ’³  UPI dominates at 34.9% β€” Digital India is real

πŸ”¬ Technical Depth

SQL β€” 8 Concepts Used

WITH customer_ltv AS (
    SELECT customer_id, SUM(revenue) as lifetime_value,
    RANK() OVER (ORDER BY SUM(revenue) DESC) as ltv_rank
    FROM fact_order_items GROUP BY customer_id
)
SELECT * FROM customer_ltv ORDER BY lifetime_value DESC;

Skills Demonstrated

Data Engineering Machine Learning Business Analytics
βœ… ETL Pipeline βœ… 4 ML Models Compared βœ… RFM Segmentation
βœ… Star Schema Design βœ… Deep Learning LSTM βœ… Anomaly Detection
βœ… Feature Engineering βœ… Churn Prediction βœ… Power BI DAX
βœ… Data Validation βœ… Data Leakage Detection βœ… Agentic AI

πŸš€ Tech Stack

Language      : Python 3.11
Database      : MySQL (Star Schema)
ML Libraries  : Scikit-learn, TensorFlow, Keras
Data          : Pandas, NumPy, Faker (Indian locale)
Visualization : Matplotlib, Seaborn, Plotly, Power BI
AI Model      : LLaMA 3.3 70B via Groq API
Frontend      : Streamlit
Deployment    : Streamlit Cloud
Security      : python-dotenv
Version Ctrl  : Git + GitHub

⚑ Run Locally

git clone https://github.com/DeveshShukla23/CHANAKYA.git
cd CHANAKYA
pip install -r layer12_streamlit_api/requirements.txt
echo "GROQ_API_KEY=your_groq_key_here" > layer12_streamlit_api/.env
cd layer12_streamlit_api
streamlit run app.py

πŸ‘¨β€πŸ’» Author

Devesh Shukla Data Analyst | Data Scientist | Builder

6 months internship experience | Passionate about turning data into decisions

LinkedIn GitHub Live App


"Data is the new Arthashastra. CHANAKYA masters both." πŸ›οΈ

⭐ Star this repo if you found it useful! ⭐

Footer

About

CHANAKYA - AI Commerce Intelligence Platform | End-to-End Data Science Capstone Project | 12 Layers | ETL | SQL | EDA | ML | Deep Learning | Power BI | Agentic AI | Streamlit

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages