Introduction

This report provides an in-depth analysis of customer purchase behaviors, with a focus on demographic features such as age and marital status. By analyzing customer data, we can uncover patterns and insights that drive marketing strategies and personalize customer experiences.

 

Objectvies

The primary goal of this analysis is to:

  • Conduct Univariate Analysis on customer demographics such as age, marital status, education, etc.
  • Analyze Multivariate relationships, focusing on how different factors like income, age, marital status, etc., relate to spending behaviors.
  • Understand the impact of having children, education level, and campaign interactions on customer spending.

 

Data Overview

Let’s begin by taking a general look at the structure and summary of the data.

csvData <- read_delim("marketing_campaign.csv", delim = "\t")
## Rows: 2240 Columns: 29
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "\t"
## chr  (3): Education, Marital_Status, Dt_Customer
## dbl (26): ID, Year_Birth, Income, Kidhome, Teenhome, Recency, MntWines, MntF...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
csvData <- csvData %>%
  mutate(Age = as.numeric(format(Sys.Date(), "%Y")) - Year_Birth)

cat("Shape of the DataFrame is:", dim(csvData), "\n\n")
## Shape of the DataFrame is: 2240 30
cat("Summary of the DataFrame:\n")
## Summary of the DataFrame:
str(csvData)
## tibble [2,240 × 30] (S3: tbl_df/tbl/data.frame)
##  $ ID                 : num [1:2240] 5524 2174 4141 6182 5324 ...
##  $ Year_Birth         : num [1:2240] 1957 1954 1965 1984 1981 ...
##  $ Education          : chr [1:2240] "Graduation" "Graduation" "Graduation" "Graduation" ...
##  $ Marital_Status     : chr [1:2240] "Single" "Single" "Together" "Together" ...
##  $ Income             : num [1:2240] 58138 46344 71613 26646 58293 ...
##  $ Kidhome            : num [1:2240] 0 1 0 1 1 0 0 1 1 1 ...
##  $ Teenhome           : num [1:2240] 0 1 0 0 0 1 1 0 0 1 ...
##  $ Dt_Customer        : chr [1:2240] "04-09-2012" "08-03-2014" "21-08-2013" "10-02-2014" ...
##  $ Recency            : num [1:22