How devika1902/inventory-analysis works
This repository is a synthetic retail demand-forecasting and replenishment decision-support demo. Its main workflow generates store/product demand and inventory inputs, builds leakage-aware features, validates and selects a forecasting model, forecasts future demand, and derives constrained reorder recommendations. The pipeline writes CSV results that the Streamlit dashboard reads for interactive scenarios, visualizations, and downloads. BigQuery DDL and a dashboard view support an optional cloud/Looker Studio path. Source excerpts show the Python call chain; SQL loading details are documented rather than implemented here.
Main entry points: pipeline.py Pipeline runner · app.py CSV data loader · forecast.py Model validation · dashboard_views.sql Inventory dashboard view
Components 17
Forecast pipeline
- Pipeline runner
src/pipeline.py - Synthetic inputs
src/data.py - Feature engineering
src/features.py - Model validation
src/forecast.py - Demand forecasts
src/forecast.py - Forecast and recommendation CSVs
src/pipeline.py
Inventory planning
- Replenishment optimizer
src/inventory.py
Decision dashboard
- CSV data loader
app.py - Scenario controls
app.py - Risk and KPI views
app.py - Forecast and metrics views
app.py - CSV downloads
app.py
Analytics warehouse
- BigQuery table schema
sql/schema.sql - Inventory dashboard view
sql/dashboard_views.sql
Other components
- Retail planner
- Google BigQuery
- Looker Studio
Connections 19
- Retail planner → Pipeline runner: runs pipeline
README.md - Pipeline runner → Synthetic inputs: generates data
src/pipeline.py - Pipeline runner → Feature engineering: builds features
src/pipeline.py - Pipeline runner → Model validation: evaluates models
src/pipeline.py - Pipeline runner → Demand forecasts: fits forecasts
src/pipeline.py - Model validation → Feature engineering: uses features
src/forecast.py - Pipeline runner → Replenishment optimizer: optimizes orders
src/pipeline.py - Pipeline runner → Forecast and recommendation CSVs: writes CSVs
src/pipeline.py - Retail planner → CSV data loader: opens dashboard
README.md - Forecast and recommendation CSVs → CSV data loader: loads CSVs
app.py - CSV data loader → Scenario controls: provides data
app.py - Scenario controls → Replenishment optimizer: recalculates scenario
app.py - CSV data loader → Risk and KPI views: filters and summarizes
app.py - CSV data loader → Forecast and metrics views: renders forecasts
app.py - CSV data loader → CSV downloads: exports data
app.py - Retail planner → Google BigQuery: loads CSV tables
- BigQuery table schema → Google BigQuery: defines tables
README.md - Inventory dashboard view → Google BigQuery: defines view
README.md - Looker Studio → Inventory dashboard view: uses view
README.md