This web app was designed to calculate the popularity of products from a particular catalog containing grocery products sold on an e-retail app. Sales revenue and quantity data of every product and category were aggregated and used to calculate the product's popularity. For a specific date, a seasonal ARIMAX model was then trained to forecast the sales revenue and quantity data for the next seven days. This was done for products sold in every major city to provide city-wise and city-wise-category-wise product popularities. The forecasted popularity score was calculated by taking the weighted average of forecasted revenue and quantity data.
A short demo of the app is given below: -
Popularity.Forecaster.App.Demo.mp4
- Python (3.8 or later recommended)
- Flask (2.0.3)
- Flask-Cors (3.0.10)
- Jinja2 (3.0.3)
- joblib (1.1.0)
- numpy
- openpyxl (3.0.9)
- pandas (1.5.0)
- pmdarima (1.8.4)
- python-dateutil (2.8.2)
- requests (2.27.1)
- scikit-learn (1.0.2)
- scipy (1.7.3)
- statsmodels (0.12.2)
- urllib3 (1.26.8)
- zipp (3.7.0)
- pyarrow
- fastparquet
- pathlib
- app.templates contains the code for front-end
- app.saved_popularity contains trained models for forecasting quantity and revenue data in pickle files
- app.models contains all code for the sarimax model including training daily models, walk-forward validation, Holt-Winters exponential smoothing, and exception handling. Trained models for each location have been stored in app.models.sarimax.trained_models for quantity and revenue in pickle files.