Menu

Using BigQuery and weather-related data to predict demand and reduce the waste

FreshDirect + Napkyn

Challenge

FreshDirect, a leader in online grocery delivery always looking for ways to decrease waste of perishable foods as well as optimize the delivery process and schedules. They noticed that one of the factors that played a role in how many people would be ordering the food was the weather.

They partnered up with Planalytics to assess and predict the demand based on that factor.

FreshDirect, a leader in online grocery delivery always looking for ways to decrease waste of perishable foods as well as optimize the delivery process and schedules. They noticed that one of the factors that played a role in how many people would be ordering the food was the weather.

They partnered up with Planalytics to assess and predict the demand based on that factor.

Solution

FreshDirect needed to provide the historical data including visit and transactional data to Planalytics broken down by app and web platforms in addition to location, shopping mode (today’s delivery or later one), and if a client was an individual or a company.

Napkyn, the FreshDirect long measurement partner, offered to leverage BigQuery to build the reports and send them to Google Cloud Storage, so they would be available for download as CSV files. 

Napkyn wrote a series of BigQuery SQL queries to produce tables that are in a format that Planalytics needed for as much historical data as were available in BigQuery for web as well as app data. 

In Google Cloud Storage, the files were automatically partitioned into several downloadable files.

FreshDirect needed to provide the historical data including visit and transactional data to Planalytics broken down by app and web platforms in addition to location, shopping mode (today’s delivery or later one), and if a client was an individual or a company.

Napkyn, the FreshDirect long measurement partner, offered to leverage BigQuery to build the reports and send them to Google Cloud Storage, so they would be available for download as CSV files. 

Napkyn wrote a series of BigQuery SQL queries to produce tables that are in a format that Planalytics needed for as much historical data as were available in BigQuery for web as well as app data. 

In Google Cloud Storage, the files were automatically partitioned into several downloadable files.

Results

Optimized Capacity: with understanding the demand better, it was possible to reduce the number of scheduled drivers in the days when the demand was predicted low and to increase when the demand was predicted higher.

Reduces food waste by 2x: The perishable food was bought according to future demand to avoid spoilage.

Increased Revenue: With understanding the demand, it was possible to keep the offerings and time slots at the level needed, so no lost opportunities to transact due to unavailable products or drivers.



Optimized Capacity: with understanding the demand better, it was possible to reduce the number of scheduled drivers in the days when the demand was predicted low and to increase when the demand was predicted higher.

Reduces food waste by 2x: The perishable food was bought according to future demand to avoid spoilage.

Increased Revenue: With understanding the demand, it was possible to keep the offerings and time slots at the level needed, so no lost opportunities to transact due to unavailable products or drivers.



Back to Case Studies

Latest Insights and Education

Latest Insights and Education

How to Use the Traffic Acquisition Report
How to Use the Traffic Acquisition Report

GA4 Reporting Basics: How to Use the Traffic Acquisition Report

Chris Wright

Associate Director, Training and Development

Sep 3, 2025

Why Manual Data Checks are Essential for Accurate CLTV Predictions

Shreya Banker

Data Scientist

Aug 20, 2025

GA4 Data Generative AI BigQuery
GA4 Data Generative AI BigQuery

How can GA4 Data be supercharged with Generative AI in BigQuery?

Shreya Banker

Data Scientist

Aug 13, 2025

More Insights

Sign Up For Our Newsletter

Sign Up For Our Newsletter

Napkyn Inc.
204-78 George Street, Ottawa, Ontario, K1N 5W1, Canada

Napkyn US
6 East 32nd Street, 9th Floor, New York, NY 10016, USA

212-247-0800 | info@napkyn.com