top of page

ECOMMERCE BUYING PATTERNS

Examined data to identify the correlation between customer buying behavior and ecommerce marketing strategy using NumPy, pandas, Jupyter, matplotlib, and Excel.

​

GitHub Repository

Overview

Project:

  • Role:   Data Analyst

  • Project Scale:   Two Months

  • Stakeholders:   CareerFoundry and Instacart

​

Tools used:

  • Python

  • Jupyter Notebook

  • Pandas

  • Seaborn and Matplotlib libraries

  • Excel

Introduction

Problem:

The Instacart stakeholders are most interested in the variety of customers in their database along with their purchasing behaviors. They want to target different customers with applicable marketing campaigns to see whether they influence the sale of their products.

​

Goal:

Uncovering information about Instacart’s customers and sales patterns. Performing initial data and exploratory analysis, deriving insights and suggesting strategies for better segmentation based on analysis results.

Approach

Column Derivations and Aggregations:

Aggregating data and creating columns to allow for a more thorough and comprehensible analysis. Makes the visuals easier to read and allows stakeholders to see analysis clearly.

  • Data was grouped together to identify products within different price ranges and food departments.

  • Data was grouped together to identify customer orders within different price ranges, order days and order hours.

  • Data was grouped together to identify customers within different age groups, income groups, family groups, and loyalty groups.

​

​​

Analysis and Visualizations:

The complete data set was explored in the following sections for more in depth analyses: Age, Income, Family Status, Goods. Visualizations were created to give stakeholders a view of the data analysis results.

  • Fifty-seven visualizations were prepared for stakeholders to better see the results.​​​​

  • Grouping products within different price ranges and food departments allowed me to dissect customer orders and identify what foods were being bough and if there were patterns based on customer characteristics.

  • Grouping customer orders within different order days and order hours broke down when the busiest days and hours were to help Instacart plan specials and advertising accordingly.

  • Grouping the price ranges of customer orders allowed us to flag customers according to their spending habits.

  • Grouping customers within different age groups, income groups, family groups, and loyalty groups helped us identify customer characteristics that correlated to orders and spending habits. This information will be used for better targeted marketing and specials.

​

​

​

Cleaning the Data

Data Wrangling
Consistency checks to remove duplicates, modify missing values, drop columns that were deemed unnecessary.

  • Three columns were deemed unnecessary and were dropped.

  • Seven columns were renamed for consistency and readability.

  • User and order IDs were changed to string.

  • Transposed one data set before properly merging.

Merging Datasets

Five original data sets were wrangled and prepped to merge for a final complete data set. 

  • After merging all five data sets the dimensions were 32,404,859 x 31.

  • 1,440,295 observations were then removed due to an exclusion flag for customers who had less than 5 orders.

Final Project

Exclusion Flag:

  • Condition: max_order <5 orders

  • Observations to be removed: 1,440,295

  • Final total count of DataSet: 30,964,564 roxs x 38 columns

Screenshot 2023-10-16 135518.png

Busiest times of purchasing products:

​

Saturday and Sunday are the busiest days for orders, while Tuesday and Wednesday are the slowest. Most orders are placed between 9 am and 4 pm, and slowest order times are between 12 am and 6 am.

bar_complete_ohod.png
bar_complete_dow.png

Price of products purchased:

​

More expensive groceries are purchased between 4-5 am but stay mostly consistent between 11 am and 1 am. They are most often purchased on Fridays and Saturdays as well.

line_complete_ohod_prices.png
line_complete_dow_prices.png

Statistical analysis of age groups:

​

Majority of customers fall into the ‘old age’ group (55+). Regardless of the age group, ordering and spending habits all follow similar patterns.

agegroups.png
bar_complete_age_odow.png
bar_complete_age_ohod.png

Statistical analysis of income groups:

​

Majority of customers fall into the ‘middle income’ group ( >=$75,000 & <$150,000). This group also has the most variation of when orders are placed and how much they spend.

incomegroups.png
bar_complete_income_odow.png
bar_complete_income_ohod.png

Final Results

Statistical analysis of family groups:

​

Majority of customers are ‘married with dependents’, while ‘single with dependents’ makes up the smallest group. All groups follow similar ordering and spending patterns.

famgroups.png
bar_complete_family_odow.png
bar_complete_family_ohod.png

Final Recommendations

After thorough data analysis, recommendations were made to Instacart on how to properly target costumers for ads and specials to boost revenue and sales numbers. The recommendations were based on customer purchasing patterns, peak spending hours, and group spending tendencies.

Project Reflections

The original data sets only had a department ID instead of a department name. Once the department data set was transposed and merged with the original data set, we could better see and understand the spending habits of customers.

​​​

​​

 

Deciding how to group customers was a task given to me by Instacart. Determining in what manner to divide the age groups, income groups, and loyalty groups to properly show differences was a fun challenge to undertake.

​​​

​​​

Looking at which goods to explore was a time-consuming task. After analysis we knew the most popular departments from which all customers ordered, but to better market the less popular items took more effort. Searching the less popular departments to find a correlation with customer characteristics helped us determine proper marketing to better targeted groups.

Groceries.jpg
bottom of page