Forecasting Demand Faster to Unlock Business Visibility

Reduced item stockouts by nearly 60 percent with a Python-based demand forecast

Industry
Food distribution

Company Profile
Regional specialty food distributor servicing restaurants and retailers

Focus Area
Machine Learning (ML), demand forecasting

Key Stakeholders
VP Sales, VP Finance

Toolkit
Python, Power BI, Power Query

Location
New York, NY

In the fast-paced world of food distribution, demand forecasting is critical for purchasing and operational decisions. Before I joined the analytics team, a leading regional specialty food distributor relied on manual data pulls and simple spreadsheet models to estimate future customer demand.

Seeing an opportunity to improve operations, I led the development of an automated demand forecasting solution for the national accounts sales team. We needed to predict weekly order quantities for over a thousand product and location combinations to support production and inventory planning. The existing manual process was time-consuming, inconsistent, and lacked statistical rigor.

To address this, I designed and implemented a Python-based ARIMA forecasting pipeline that ingested three years of historical invoiced quantity data by product and location. Recognizing the scale of the data and the limitations of single-threaded processing, I engineered a parallel processing framework using the concurrent.futures library, leveraging six CPU cores to reduce runtime from over 12 hours to under two. Flexible logic was built in to handle edge cases such as products with flat historical demand, generating either ARIMA-based or flat forecasts as appropriate.

For transparency and usability, pipeline outputs were structured as Excel files saved both as current forecasts and historical archives. I integrated the outputs directly into our Power BI semantic model, enabling interactive dashboards where business stakeholders could view forecasts alongside actuals and assess forecast accuracy with metrics such as MAPE and bias. Throughout the process, I documented the methodology, created user FAQs, and developed a robust versioning approach to maintain clarity on pipeline updates.

The forecasting solution delivered more than just operational efficiencies. It created a scalable and reliable approach to demand planning, giving teams the confidence to make better decisions with less guesswork. Forecast accuracy improved dramatically, with MAPE scores dropping from 38 percent to 10 percent by incorporating seasonality into the models.

But the real breakthrough was in how the solution was adopted. Rather than framing it as a complex machine learning tool, it was introduced as a “gut check” – a way for the sales team to validate and strengthen their instincts with data. This framing built trust and buy-in, encouraging teams to use the forecasts as a partner in their planning rather than a replacement for their expertise. Analysts regained time to focus on higher-value activities like variance investigation and scenario modeling, and the business shifted its conversation from “Do we have enough?” to “How can we plan smarter for what’s next?”

Next
Next

Creating a Data Strategy to Drive Alignment