Skip to content

Time series forecasting system providing actionable sales predictions for inventory, staffing, and revenue planning. Uses Holt-Winters exponential smoothing with interactive visualizations for business decision support.

Notifications You must be signed in to change notification settings

Emart29/sales-forecasting-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales Forecasting Dashboard — Decision-Focused Time Series Analysis

Problem

Retail teams often struggle to anticipate sales fluctuations, leading to stockouts, overstocking, and inefficient resource allocation.
Traditional dashboards show historical trends, but rarely provide actionable forecasts for decision-making under uncertainty.


What this project demonstrates

This project implements a time series forecasting framework to generate interpretable, actionable predictions that inform inventory, marketing, and financial planning decisions.

The focus is on decision support, not just visualizations.


Decisions this system supports

  • Forecasting monthly sales to optimize inventory levels
  • Planning staffing and resource allocation based on expected demand
  • Timing marketing campaigns for peak revenue months
  • Estimating revenue and detecting potential shortfalls
  • Understanding seasonality and growth trends for strategic planning

Analytical approach

Data

  • Historical retail sales: 2015–2018
  • Aggregated monthly by region and product category
  • Features: sales amount, product category, region, customer demographics

Forecasting methods

  • Holt-Winters Exponential Smoothing (trend + seasonality)
  • Comparative evaluation against Linear Regression and Moving Average
  • Forecast uncertainty quantified with confidence intervals
  • Optional: additional methods (Prophet, ARIMA) for model comparison

Model selection

  • Holt-Winters selected due to superior predictive performance (MAE $13,133 vs $34,823 baseline)
  • Captures seasonal peaks and growth trends accurately
  • Model evaluation emphasizes decision relevance over raw accuracy

Example: Forecast outcome

Scenario: Total monthly sales for 2019

Predictions

  • Total Sales: $899,039
  • Expected Growth: +24.5% vs 2018
  • Peak months: November ($114K), December ($116K)

Business interpretation

  • Inventory planning: stock levels adjusted for seasonal peaks
  • Marketing: campaigns aligned with predicted high-demand months
  • Risk management: early warning for potential revenue shortfalls

System overview

  • Data ingestion: CSV, aggregated time series
  • Forecasting engine: Python, Statsmodels
  • Visualization: Streamlit + Plotly
  • Outputs: Forecast tables, interactive charts, downloadable CSVs

Architecture (compressed)

  • Backend/Engine: Python 3.8+, Statsmodels, NumPy, Pandas
  • Dashboard: Streamlit + Plotly for interactive visualization
  • Evaluation: MAE, RMSE, R² score comparison across models

Why this matters for Data Science

Forecasting is decision-oriented modeling under uncertainty.
This project demonstrates:

  • Time series decomposition and trend/seasonality detection
  • Model evaluation for actionable outcomes
  • Translation of analytical results into business decisions
  • Understanding uncertainty and risk in forecasts

Project structure

sales-forecasting-dashboard/
│
├── data/
│   └── SuperstoreSalesDataset.csv
│
├── notebooks/
│   └── 01_sales_forecasting_analysis.ipynb
│
├── models/
│   └── sales_forecast_model.pkl
│
│── screenshots/
│     └── forecast.png
│     
├── app.py
├── requirements.txt
├── README.md
└── .gitignore

Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Installation

  1. Clone the repository
git clone https://github.com/Emart29/sales-forecasting-dashboard.git
cd sales-forecasting-dashboard
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
streamlit run app.py
  1. Open your browser and navigate to http://localhost:8501

Screenshots

Forecast Visualization

Forecast

Author

[Emmanuel Nwanguma]

About

Time series forecasting system providing actionable sales predictions for inventory, staffing, and revenue planning. Uses Holt-Winters exponential smoothing with interactive visualizations for business decision support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published