Analysis of customer behavior and consistency on Swiggy Instamart

Swiggy Instamart is a Indian Ecommerce platform that operates similarly to UberEATS. It can deliver food, personal care products and more. It aims to provide quick and easy delivery service within a 10-15 minute timeframe.

Relationship between Service Ratings and Delivery Time (Scatterplot)

Here’s what I found on Service Rating vs Delivery Time in regards to Swiggy Instamart. There’s an even distribution across all service ratings, 1 being the worst and 5 being the best. This shows that factors outside of delivery times influences ratings. In terms of reviews, shorter delivery times have more reviews which shows that a better customer experience will more likely lead to more frequent and better ratings.

platform_filtered = df[df["Platform"] == "Swiggy Instamart"]
if "count_hundreds" not in platform_filtered:
    platform_filtered["count_hundreds"] = platform_filtered["Order Value (INR)"]// 100

plt.figure(figsize=(10, 14))
scatter = plt.scatter(platform_filtered["Service Rating"],
platform_filtered["Delivery Time (Minutes)"], 
c=platform_filtered["count_hundreds"],
s=platform_filtered["count_hundreds"] * 10,
cmap="viridis",
edgecolors="black",
marker="8",
alpha=0.7)

plt.title("Service Ratings vs. Delivery Time on Swiggy Instamart", fontsize=12)
plt.xlabel("Service Rating", fontsize=14)
plt.ylabel("Delivery Time (Minutes)", fontsize=14)

cbar = plt.colorbar(scatter)
cbar.set_label("Number of Reviews", rotation=270, fontsize=14, color="black", labelpad=30)
plt.xticks(np.arange(int(platform_filtered["Service Rating"].min()), int(platform_filtered["Service Rating"].max()) + 1, 1),
           fontsize=14, color="black")
plt.yticks(np.arange(platform_filtered["Delivery Time (Minutes)"].min(), platform_filtered["Delivery Time (Minutes)"].max() + 1, 2),
           fontsize=10, color="black")
plt.show()

### Delivery Delays on Swiggy Instamart(Pie Chart) Here’s what I found on delivery reliability in regards to Swiggy Instamart. This Pie Chart shows that only 13.8% of all deliveries on Swiggy are delayed, which shows that Swiggy is a highly efficient delivery system.

platform_filtered = df[df["Platform"] == "Swiggy Instamart"]
delivery_delay_counts = platform_filtered["Delivery Delay"].value_counts()
plt.figure(figsize=(10, 6))
colors4pie = ['Blue', 'Red']
plt.pie(delivery_delay_counts, labels=delivery_delay_counts.index, autopct='%1.1f%%',
        startangle=140, colors=colors4pie, textprops={'fontsize': 12}, wedgeprops={'edgecolor': 'black'})
plt.title("Delivery Delay Status on Swiggy Instamart", fontsize=18)

plt.show()

#### Consistent delivery time across all Products (Bar Graph)

Here’s what i found about Swiggy’s consistency across all their products. Swiggy have 6 major products that they deliver on their platform: Beverages, Groceries, Personal Care, Snacks, Dairy and Fruits & Vegetables. Across all products, Swiggy on average delivers their products in around 29 minutes. This shows that Swiggy has efficient logistics system that doesn’t vary based on what the product is.

avg_delivery_time = platform_filtered.groupby("Product Category")["Delivery Time (Minutes)"].mean().sort_values()
plt.figure(figsize=(12, 8))
bars = plt.bar(avg_delivery_time.index, avg_delivery_time.values, color='skyblue')
plt.xlabel("Products", fontsize=16)
plt.ylabel("Average Delivery Time (Minutes)", fontsize=14)
plt.title("Average Delivery Time For Each Product on Swiggy Instamart", fontsize=16)
plt.xticks(fontsize=12)
for bar in bars:
    plt.text(bar.get_x() + bar.get_width()/2, bar.get_height(), f"{bar.get_height():.1f}",
             ha='center', va='bottom', fontsize=12, color='black', fontweight='bold')
plt.show()

##### Average Order value by Product Category On Swiggy (Line Chart) Here’s what I found about the Average Order Value on Swiggy for each product. There’s varying average order value by each product on Swiggy, with Personal Care having the highest and snacks being the least. This shows that customers are more likely to spend more on essential goods and products. Even with the varying average order value, it also ties into the previous visualization as even with a higher order value, the delivery times are consistent.

avg_order_value = platform_filtered.groupby("Product Category")["Order Value (INR)"].mean().sort_values()
plt.figure(figsize=(12, 6))
plt.plot(avg_order_value.index, avg_order_value.values, marker='o', linestyle='-', color='blue', linewidth=2, markersize=6)
plt.xlabel("Product", fontsize=14)
plt.ylabel("Average Order Value", fontsize=14)
plt.title("Average Order Value by Product On Swiggy Instamart", fontsize=16)
plt.xticks(fontsize=12)
plt.grid(axis='y', linestyle='--', alpha=0.7)

plt.show()

##### Impact of Delivery Delays on Refund Requests on Swiggy (Nested Pie Chart) Finally, here is what I found about Delivery delays anb refund request on Swiggy. A majority of deliveries aren’t delayed, with a majority of them not requesting a refund. Which shows customer satisfaction. A significant proportion of customers do not request refunds, even when there is a delivery delay. However, a notable percentage of customers request refunds when a delay occurs, showing that delays does impact customer satisfaction. This also shows that refund behavior is split between delayed deliveries, such as when product related issues are involved and not solely based on timing.

delivery_delay_counts = platform_filtered["Delivery Delay"].value_counts()
refund_counts = platform_filtered.groupby("Delivery Delay")["Refund Requested"].value_counts()

colors_inner = ['Green', 'Red']
colors_outer = ['Green', 'Red', 'Green', 'Red']
inner_sizes = delivery_delay_counts.values
outer_sizes = refund_counts.values

inner_labels = delivery_delay_counts.index
outer_labels = [f"{index[0]} - {index[1]}" for index in refund_counts.index]

fig, ax = plt.subplots(figsize=(10, 6))
#inner pie
ax.pie(inner_sizes, labels=inner_labels, colors=colors_inner,
       radius=1, autopct='%1.1f%%', pctdistance=0.65, wedgeprops={'edgecolor': 'black', 'width': 0.3})
#outer pie
ax.pie(outer_sizes, labels=outer_labels, colors=colors_outer,
       radius=1.3, autopct='%1.1f%%', pctdistance=0.85, wedgeprops={'edgecolor': 'black', 'width': 0.3})
ax.set(aspect="equal")
plt.title("Delivery Delay vs. Refund Requested (refund= yes or no)", fontsize=12)

plt.show()