Delivery App Analysis
This is an analysis of a dataset corresponding to a food delivery app. It gives us data about customers and their purchasing preferences. It also lets us know which advertising campaigns they have accepted. Our goal here will be to optimize these campaigns so that they are well targeted to our customers and have a higher conversion rate.
We can first clean our dataset, look at atypical data, then do an initial correlation analysis to understand what approach we can give to this dataset and be able to implement a customer classification algorithm.
Let's take a look at how many variables and records make up our dataset.
Check for missing data
In this dataset there are different outliers and there is missing data in the Income of the clients, we are going to make some adjustments to clean our dataset as best as possible.
Seeing the unique values I can notice there is no Zero Income, there could be cases in which the customer doesn't have incomes and the amount spend in the app comes from a related. Also we can see an atypical amount of 666,666.0 that is not usual because the exact number and how far is from the rest of the data.
Here below we can see more variables, now with our df completed, we can notice the min Year_Birth is 1893, but now in 2024 it's imposible to have that year of birth, it'd be 131 years old.
In fact, there are other registers with more than 100 years.
We can convert the Dt_customer to days being customer, maybe years would be better.
Now we can delete the Dt_Customer, and at the time we can proceed deleting the ID that doesn't help to this analysis.
Now we will drop any registered customer that its value is 0 for each column Mnt that represents the amount of 'x' product bought, meaning that we will base our analysis just with the customers that buy in the platform so we can have accurate targets based on historical purchases.
View correlations
Accepted Campaign #1
We can observe the moderated correlation between those who accepted campaign 1 and campaign 5.
Seeing the correlational columns of Campaign 1 and 5, We can see the share some correlations, but in case of Camp 1 its only correlation moderate is Camp 5, the other ones are weak correlations. Meanwhile in Camp 5 MntWines has a moderate correlation with Camp 5.
Now let's see correlations for the products
We can see that there are no strong correlations in this dataset, but there are moderate ones, approaching strong in the case of wines, where there is a correlation of 0.67 with the Income variable, 0.61 with catalog purchases. On the other hand, in meat products we see a correlation of 0.68 with catalog sales, 0.64 with the Income variable, similar to Wines. Between these two products we see a moderate correlation of 0.57, which after seeing the correlations of campaigns 1 and 5 suggests that they are moderately related customers.
Since these campaigns are similar, we can perform a second, more detailed analysis of the Wine and Meat products and see the demographic ranges that comprise them, unify both campaigns in a dataset and extract more specific categories by applying clustering with K-means.