How ML/AI is revolutionizing grocery delivery service….. | Aug 2020

Ravi CHandra
Analytics Vidhya
Published in
5 min readAug 16, 2020

--

Image credits: https://michelleismoneyhungry.com/gentrification-one-grocery-stores/

The global online grocery market size was valued at USD 189.81 billion in 2019 and is projected to register a CAGR of 24.8% from 2020 to 2027. Rising disposable income and people’s increasing inclination toward comfort are anticipated to drive the market over the forecast period.

With rising demand on online grocery delivery platforms amid coronavirus lockdown, JioMart is Reliance Industries’ bid to cash in on the spurt in this segment.

So grocery delivery is a huge opportunity for businesses to cash on customer comfort of ordering groceries from home. There’s huge scope of machine learning in this space. Alone in India there is Flipkart, Amazon, Jiomart, Swiggy, big basket and others who are betting on grocery service space.

Yesterday I was reading an article about how Instacart (Grocery delivery company based out of San Francisco) was solving tough and complex business problems around grocery delivery service. I will also compare it with Swiggy stores, which is recently launched by Swiggy for grocery delivery in India which is like really popular in India, because both of these companies are in same space and share common problems comparing them would make sense.

A quick summary of problems which this company addresses using data science and ml solutions:

  1. Advertisement of products is Instacart’s business model to drive grocery stores sales. So maximizing the customer conversion rate through advertisement and targeting customers to right grocery items or stores would generate revenue for Instacart. About 30% of all purchases made on Instacart go to advertised products.
Restaurants advertisement on swiggy. Image credits: Swiggy.in

2. Boosting the traffic to a specific store for visibility also increases Instacart revenue options, as grocery store owners are willing to pay if there is lot of new customer traffic on their page. They get sizable portion of revenue.

A/B testing. Image credits: Shopify

3. They also need an estimate by how much percent ML can improve operational efficiency which throws light on various A/B testing that can be done.

4. They also need a forecast of how much a customer spends on their service, to forecast demand which is essential in having an equilibrium in supply/demand.

5. It would also need to know how many customers are repeat customers which purchase on regular basis, with which they can develop smart algorithms to predict their needs ahead of time.

Demand increases when it rains, so it charges the customer extra fee. Image credits: Swiggy.in

6. There is high variance in predicting the time it takes to deliver an order based on various factors like weather, road condition, rush at store, how long will it take for store to pack the order and available delivery agents etc etc. So there’s absolutely a lot of room for data science here.

Image credits: Optimove.com

7. They also need to identify customers based on their behavior. There are 3 types of customers, one that will go ahead and shop. Two which walked away because of poor delivery options and three were just here to browse and not buy.

8. One could also visualize the customer happiness using histogram where on x axis you have time to deliver and on y axis you have customer happiness.

Delivery time estimation. Image credits: Swiggy.in

9. Instacart is also building its own model for travel time for delivery agent to deliver order to specific customer, as most of orders are repeat orders and there is high possibility that these events can be predicted with high certainty.

Item recommendation. Image credits: Swiggy.in

10. Recommending items dynamically to the user (Which he/she might be interested) would also increase conversion.

As we can see there’s so much room for data science/ Machine learning in increasing operational efficiency in grocery delivery. This got me interested to know if any data is available for me to try these things, fortunately Instacart put up a competition on Kaggle which basically asks you to predict which products will be in a user’s next order.

Notes on the data:

  1. Dataset is anonymized so there’s no personal information about the customer which actually adds value in prediction but it shouldn’t be a problem.
  2. Data is huge with 3 Million orders from 200k customer.
    The sequence in which products are purchased might give so much information.
  3. Timestamps are really important in predicting customer behavior as they would not purchase a grocery item until they’ve used it and need it again. There are a lot of intuitions on time like some products maybe bought by customer in first week of the month, he/she might also might reorder certain items based on his previous purchases. So much scope of data science.

I’m doing this article in parts as a series, so in my next article I will be diving deep into exploring the data and giving insights of what I find. I will also set stage for some baseline model ideas which would make it easy to compare our machine learning model to a naive model and decide if its really working or not.

I’m really excited to work on this project, please clap or leave a comment if you found this article informative and also let me know if you have any questions. I’m looking forward to hear what you have to say in the comments and I’m excited for the next part “Exploring the Instacart data”.

Please clap if you’ve found this article helpful

References:
1. https://medium.com/dataseries/how-instacart-uses-data-science-to-tackle-complex-business-problems-774a826b6ed5

2. https://www.kaggle.com/c/instacart-market-basket-analysis/data

3. https://www.grandviewresearch.com/industry-analysis/online-grocery-market#:~:text=The%20global%20online%20grocery%20market,market%20over%20the%20forecast%20period.

4. https://www.businesstoday.in/latest/trends/reliance-jiomart-opens-online-grocery-service-in-200-cities-key-things-to-now/story/404916.html

--

--

Ravi CHandra
Analytics Vidhya

Self taught Data scientist who is passionate about how machine learning and AI can change the world.