This is an end-to-end data analytics project that analyzes customer purchasing behaviour to uncover insights about revenue trends, customer segments, and buying patterns.
- Revenue Drivers: Male customers contribute significantly to the total revenue, with specific interest in the Clothing and Accessories categories.
- Seasonal Trends: Significant peaks in purchasing frequency were observed during the Fall season, suggesting a need for increased inventory during this period.
- Customer Loyalty: Approximately 15% of the customer base is categorized as "Loyal" (over 10 previous purchases), yet they account for a disproportionate amount of total sales.
- Discount Impact: Use of promo codes resulted in a higher average transaction value compared to non-promo transactions.
| Tool | Purpose |
|---|---|
| Python | Data loading, Cleaning, and EDA (Pandas, Seaborn) |
| PostgreSQL | Structured data storage and complex business queries |
| Power BI | Building interactive visual reports and KPIs |
| Jupyter | Development environment for data exploration |
I used PostgreSQL to answer specific business questions. Here is an example of the segmentation logic used:
-- Customer segmentation by purchase history
SELECT customer_segment, COUNT(*) AS total_customers
FROM (
SELECT customer_id,
CASE
WHEN previous_purchases = 1 THEN 'New'
WHEN previous_purchases BETWEEN 2 AND 10 THEN 'Returning'
ELSE 'Loyal'
END AS customer_segment
FROM customer
) t
GROUP BY customer_segment;- Clone the repository:
git clone [https://github.com/bsanghvi78/Customer-Behaviour-Analysis.git](https://github.com/bsanghvi78/Customer-Behaviour-Analysis.git)
- Install Dependencies: Make sure you have Python installed, then run: Bash pip install pandas matplotlib seaborn
- Run the Analysis: Open Customer_shopping_behaviour.ipynb in Jupyter Notebook or VS Code to view the analysis.
-
Customer_shopping_behaviour.ipynb: The main Python notebook containing data cleaning and EDA. -
customer_shopping_behavior.csv: The raw dataset used for the analysis. -
SQL-Queries.pdf: Documentation of SQL scripts used for database analysis. -
Customer-Shopping-Behavior-Analysis.pptx: Final presentation of business findings. -
Customer Shopping Behavior Analysis.pdf: Comprehensive written report.