Delete README.md
Browse files
README.md
DELETED
|
@@ -1,152 +0,0 @@
|
|
| 1 |
-
## Part 1: Dataset Description
|
| 2 |
-
|
| 3 |
-
### Dataset Source
|
| 4 |
-
|
| 5 |
-
The dataset used in this project is the **E-Commerce Customer Behavior and Sales Analysis Dataset**, which was obtained from Kaggle.
|
| 6 |
-
|
| 7 |
-
**Source:**
|
| 8 |
-
[E-Commerce Customer Behavior and Sales Analysis Dataset on Kaggle](https://www.kaggle.com/datasets/umuttuygurr/e-commerce-customer-behavior-and-sales-analysis-tr)
|
| 9 |
-
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
### Dataset Overview
|
| 13 |
-
|
| 14 |
-
This project is based on an e-commerce dataset that contains customer transaction and behavior information.
|
| 15 |
-
The dataset includes details about customers, products, and purchase activity, making it suitable for analyzing customer spending behavior and identifying sales patterns.
|
| 16 |
-
|
| 17 |
-
The main purpose of using this dataset is to better understand how different customer and transaction-related factors are connected to the total amount spent by customers.
|
| 18 |
-
|
| 19 |
-
---
|
| 20 |
-
|
| 21 |
-
### Dataset Features
|
| 22 |
-
|
| 23 |
-
The dataset contains both **numerical** and **categorical** features, which allows a combination of exploratory data analysis, feature engineering, and machine learning modeling.
|
| 24 |
-
|
| 25 |
-
The main feature groups include:
|
| 26 |
-
|
| 27 |
-
| Feature Group | Examples | Description |
|
| 28 |
-
|---|---|---|
|
| 29 |
-
| Customer Information | Customer ID, Gender, Age, Location | Describes customer demographic and identity-related information |
|
| 30 |
-
| Product Information | Product Category, Product Name | Describes the type of products purchased by customers |
|
| 31 |
-
| Transaction Information | Purchase Frequency, Quantity, Total Spend | Describes customer purchasing activity and spending behavior |
|
| 32 |
-
|
| 33 |
-
This variety of features provides a strong basis for analyzing customer behavior from multiple perspectives.
|
| 34 |
-
|
| 35 |
-
---
|
| 36 |
-
|
| 37 |
-
### Target Variable
|
| 38 |
-
|
| 39 |
-
The target variable selected for this project is:
|
| 40 |
-
|
| 41 |
-
**`Total Spend`**
|
| 42 |
-
|
| 43 |
-
This variable represents the total amount of money spent by a customer.
|
| 44 |
-
Since `Total Spend` is a numerical variable, the main predictive task in this project is a **regression problem**.
|
| 45 |
-
|
| 46 |
-
The goal of the regression model is to predict customer spending based on available customer, product, and transaction-related features.
|
| 47 |
-
|
| 48 |
-
---
|
| 49 |
-
|
| 50 |
-
### Research Question
|
| 51 |
-
|
| 52 |
-
The main research question of this project is:
|
| 53 |
-
|
| 54 |
-
**Which customer and purchasing behavior factors have the strongest influence on total spending in an e-commerce environment?**
|
| 55 |
-
|
| 56 |
-
In addition, this project aims to build a machine learning model that can predict how much a customer is likely to spend based on their characteristics and purchasing behavior.
|
| 57 |
-
|
| 58 |
-
---
|
| 59 |
-
|
| 60 |
-
### Project Goal
|
| 61 |
-
|
| 62 |
-
The goal of this project is to analyze customer behavior, discover meaningful spending patterns, and develop predictive models that can support better business understanding and decision-making in an e-commerce context.
|
| 63 |
-
|
| 64 |
-
---
|
| 65 |
-
|
| 66 |
-
## Part 2: Exploratory Data Analysis (EDA)
|
| 67 |
-
|
| 68 |
-
### Data Cleaning
|
| 69 |
-
|
| 70 |
-
Before performing the analysis, the dataset was checked for common data quality issues.
|
| 71 |
-
|
| 72 |
-
The dataset was found to be clean and well-structured:
|
| 73 |
-
|
| 74 |
-
- No missing values were found.
|
| 75 |
-
- No duplicate records were found.
|
| 76 |
-
- The date column was already properly formatted.
|
| 77 |
-
- Categorical values were consistent and did not contain spelling mistakes or irregular entries.
|
| 78 |
-
- Identifier columns such as `Order_ID` and `Customer_ID` were excluded from consistency checks because they naturally contain many unique values.
|
| 79 |
-
|
| 80 |
-
Although the numerical features have different scales, no scaling was applied at this stage because scaling is not required for exploratory data analysis.
|
| 81 |
-
|
| 82 |
-
Overall, the dataset did not require major cleaning steps and was ready for analysis.
|
| 83 |
-
|
| 84 |
-
### Outlier Detection and Handling
|
| 85 |
-
|
| 86 |
-
Outliers were examined as part of the exploratory data analysis in order to identify unusually high or low values that could affect the results.
|
| 87 |
-
|
| 88 |
-
First, summary statistics were reviewed to check the value ranges of the numerical features. Then, distribution plots were created for selected variables such as `Unit_Price`, `Total_Amount`, and `Age` to better understand how the values are spread.
|
| 89 |
-
|
| 90 |
-
In addition, the **IQR method** was used to detect outliers across the numerical columns.
|
| 91 |
-
|
| 92 |
-
The results showed that most features had reasonable value ranges. However, some variables, especially `Unit_Price`, `Discount_Amount`, and `Total_Amount`, contained extreme high values and showed a right-skewed distribution.
|
| 93 |
-
|
| 94 |
-
Since these values may represent real customer behavior, they were not removed from the dataset. Instead, capping was applied using the IQR method in order to reduce the influence of extreme values while keeping the original data structure.
|
| 95 |
-
|
| 96 |
-
Features that did not show significant outliers were left unchanged.
|
| 97 |
-
|
| 98 |
-
### Descriptive Statistics and Correlation Analysis
|
| 99 |
-
|
| 100 |
-
Descriptive statistics were used to understand the main numerical features in the dataset, including their average values, spread, and overall distribution.
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-

|
| 104 |
-
|
| 105 |
-

|
| 106 |
-
|
| 107 |
-
## Visualizations
|
| 108 |
-
|
| 109 |
-
In this section, visual analysis was used to better understand customer spending behavior and identify the main factors that influence `Total_Amount`.
|
| 110 |
-
|
| 111 |
-
### Main Questions and Insights
|
| 112 |
-
|
| 113 |
-
| Question | Main Insight |
|
| 114 |
-
|---|---|
|
| 115 |
-
| Does product category affect total spending? | Yes. Electronics has the highest average spending, while Books has the lowest. |
|
| 116 |
-
| Does city influence total spending? | City has a moderate effect. Istanbul contributes the most, but no single city dominates. |
|
| 117 |
-
| How do price and quantity affect spending? | `Unit_Price` and `Quantity` strongly increase `Total_Amount`. |
|
| 118 |
-
| Does gender affect spending patterns? | No major difference was found between males and females. |
|
| 119 |
-
| Does age affect total spending? | Age has a weak effect, with similar spending across most age groups. |
|
| 120 |
-
| Do payment method and device type affect spending? | Some differences exist, but the effect is limited. |
|
| 121 |
-
| How does discount percentage affect spending? | Higher discount percentages are associated with lower total spending. |
|
| 122 |
-
| How do city and product category interact? | Electronics performs strongly across most cities. |
|
| 123 |
-
|
| 124 |
-
### Advanced Visual Analysis
|
| 125 |
-
|
| 126 |
-
Additional visualizations were created to explore business opportunities more deeply.
|
| 127 |
-
|
| 128 |
-
The advanced heatmap showed the average purchase amount by both `City` and `Product_Category`. This helped identify which product categories perform better in specific cities.
|
| 129 |
-
|
| 130 |
-
An interactive dashboard was also created to analyze high-value purchases by product category. This allowed the identification of categories that are more likely to generate expensive transactions.
|
| 131 |
-
|
| 132 |
-
Finally, a business opportunity dashboard combined several metrics:
|
| 133 |
-
|
| 134 |
-
- Average purchase amount
|
| 135 |
-
- Total revenue
|
| 136 |
-
- Number of transactions
|
| 137 |
-
- High purchase rate
|
| 138 |
-
|
| 139 |
-
This helped identify the strongest city-category combinations for business growth.
|
| 140 |
-
|
| 141 |
-
### Key Takeaways
|
| 142 |
-
|
| 143 |
-
The visual analysis shows that customer spending is mainly influenced by:
|
| 144 |
-
|
| 145 |
-
- `Product_Category`
|
| 146 |
-
- `Unit_Price`
|
| 147 |
-
- `Quantity`
|
| 148 |
-
- `Discount_Percentage`
|
| 149 |
-
|
| 150 |
-
Features such as `Age` and `Gender` had a weaker impact on spending behavior.
|
| 151 |
-
|
| 152 |
-
Overall, the strongest business opportunities are found in product categories with high average spending and high purchase rates, especially Electronics, Home & Garden, and Sports.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|