How trung1609/ecommerce-bigdata works
This repository is an e-commerce behavior analytics and purchase-prediction project. Its implemented workflow reads raw event data, cleans it into Silver Parquet, produces Gold analytics and ML features, then presents analytics and model predictions in a Streamlit dashboard. The README describes storage as a pipeline stage, but no storage implementation appears in the tree; the data-layer node represents the documented Bronze/Silver/Gold layout. Pipeline 2–4 and some full-run behavior are described as planned or incomplete, so edges are limited to documented or indexed relationships.
Main entry points: app.py Streamlit app · data Parquet layers · run_all_gold_pipelines.py Gold orchestration · data_loader.py Gold data loader
Components 22
Data preparation
- Raw events
data/bronze - CSV ingestion
src/ingestion/load_data.py - Event cleaning
src/etl/clean_events.py - Parquet layers
data
Analytics and ML
- Gold orchestration
src/analytics/run_all_gold_pipelines.py - Daily KPIs
src/analytics/business_kpis.py - Funnel analysis
src/analytics/funnel_analysis.py - Category and brand
src/analytics/category_brand_stats.py - Customer RFM
src/analytics/customer_rfm.py - Session features
src/ml/feature_engineering.py - Model training
src/ml/train.py - Model evaluation
src/ml/evaluate.py - Purchase inference
src/ml/predict.py
Dashboard
- Streamlit app
dashboard/app.py - Filters sidebar
dashboard/components/sidebar.py - Theme styling
dashboard/components/styles.py - Gold data loader
dashboard/utils/data_loader.py - Overview tab
dashboard/tabs/tab1_overview.py - Funnel tab
dashboard/tabs/tab2_funnel.py - Products tab
dashboard/tabs/tab3_products.py - RFM tab
dashboard/tabs/tab4_rfm.py - ML prediction tab
dashboard/tabs/tab5_ml_prediction.py
Connections 29
- Raw events → CSV ingestion: reads CSV
README.md - CSV ingestion → Event cleaning: loads events
src/etl/clean_events.py - Event cleaning → Parquet layers: writes Silver
src/etl/clean_events.py - Parquet layers → Gold orchestration: supplies Silver
src/analytics/run_all_gold_pipelines.py - Gold orchestration → Daily KPIs: runs KPI job
src/analytics/run_all_gold_pipelines.py - Gold orchestration → Funnel analysis: runs funnel job
src/analytics/run_all_gold_pipelines.py - Gold orchestration → Category and brand: runs stats job
src/analytics/run_all_gold_pipelines.py - Gold orchestration → Customer RFM: runs RFM job
src/analytics/run_all_gold_pipelines.py - Gold orchestration → Parquet layers: writes Gold
src/analytics/run_all_gold_pipelines.py - Parquet layers → Session features: reads Silver
src/ml/feature_engineering.py - Session features → Parquet layers: writes features
src/ml/feature_engineering.py - Model training → Session features: uses features
src/ml/train.py - Model training → Model evaluation: evaluates models
src/ml/train.py - Streamlit app → Theme styling: applies theme
dashboard/app.py - Streamlit app → Filters sidebar: renders filters
dashboard/app.py - Streamlit app → Overview tab: renders tab
dashboard/app.py - Streamlit app → Funnel tab: renders tab
dashboard/app.py - Streamlit app → Products tab: renders tab
dashboard/app.py - Streamlit app → RFM tab: renders tab
dashboard/app.py - Streamlit app → ML prediction tab: renders tab
dashboard/app.py - Filters sidebar → Gold data loader: gets categories
dashboard/components/sidebar.py - Overview tab → Gold data loader: loads KPIs
dashboard/tabs/tab1_overview.py - Funnel tab → Gold data loader: loads funnel
dashboard/tabs/tab2_funnel.py - Products tab → Gold data loader: loads product stats
dashboard/tabs/tab3_products.py - RFM tab → Gold data loader: loads segments
dashboard/tabs/tab4_rfm.py - Gold data loader → Parquet layers: reads Gold
dashboard/utils/data_loader.py - ML prediction tab → Purchase inference: requests scores
dashboard/tabs/tab5_ml_prediction.py - Streamlit app → Parquet layers: presents analytics
README.md - Streamlit app → Purchase inference: presents model results
README.md