Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON /DS ASSIGNMENT Full Coding Procedure must be provided to earn full mark Exploring customer segmentation and customer lifetime value for sales forecasting Introduction: An

PYTHON /DS ASSIGNMENT

Full Coding Procedure must be provided to earn full mark

Exploring customer segmentation and customer lifetime value for sales forecasting

Introduction:

An England-based company that supplies unique all-occasion gifts, such as themed dishware and trendy household items, takes pride in offering an unparalleled selection of carefully curated products designed to enhance every special moment. With over 1 million transactions realized between 2009 and 2011, this company provides products for wholesalers, retail stores, or resellers. This means it sells to sales channel partners and stores that are looking for unique gift ideas and products for their customers. As a product supplier for wholesale stores, the company deals with cancellations and bulk orders. Due to the nature of the gift-giving product category, the volume of business is high during peak holiday seasons, which in Enland occur from October to December.

The challenge is to better understand the customer data available and historical sales, to identify an opportunity to build targeted segments to market and to forecast sales.

Another key factor to keep in mind is that the analysis also considers cancellations and returns, so the segmentation approach should identify customer groups who are qualified customers who generally don't show indicators of returning or canceling their orders. A key goal in retail is to ensure profitable sales that minimize returns and cancellations, which impacts the profitability of the organization.

Goals

  • Understand the data of the challenge and its features.
  • Perform an exploratory data analysis to identify patterns and insights that help solve the challenge.
  • Prepare the data that will be necessary to solve the challenge.
  • Establish a customer segmentation technique and describe the results.
  • Define the strategy, implement the forecast model for each customer segment, and describe the results.
  • Present the results and main insights found in the execution of the challenge.

Note : Provide python code to illustrate the following step to solving the challenge:

Load the Datasets: Use pandas to read the two datasets from the provided links. use the read_csv function.

Data Preprocessing:

  • Merge the two datasets into one by concatenating them vertically.
  • Check for and handle missing values.
  • Remove duplicates and cancellations.
  • Perform feature engineering if necessary, such as deriving new features from existing ones.
  • Transform data types as needed.

Exploratory Data Analysis (EDA):

  • Explore the data to understand its distribution, relationships, and any interesting patterns.
  • Visualize the data using libraries like matplotlib and seaborn.
  • Calculate summary statistics and identify outliers.

Customer Segmentation:

  • Choose an appropriate segmentation technique. Common methods include RFM (Recency, Frequency, Monetary), k-means clustering, or any other method suitable for your data.
  • Perform the segmentation and assign customers to segments.

Customer Lifetime Value (CLV) Analysis:

  • Calculate customer lifetime value using relevant metrics.
  • Explore the CLV distribution and analyze which segments contribute most to the company's revenue.

Sales Forecasting:

  • For each customer segment, build a sales forecasting model. You can use time series forecasting methods (e.g., ARIMA, Exponential Smoothing) or machine learning models (e.g., regression, random forests).
  • Train the models and make forecasts.

Presenting Results:

  • Summarize your findings in a clear and concise manner.
  • Use visualizations and tables to support your results.
  • Provide actionable insights and recommendations based on your analysis.

The table below describes each of the features.

Data Element

Type

Description

Invoice

object

Invoice number. A 6-digit integral number is uniquely assigned to each transaction. If this code starts with the letter 'c', it indicates a cancellation.

StockCode

object

Product (item) code. A unique 5-digit integral number is assigned to each distinct product.

Description

object

Product (item) name.

Quantity

int64

The quantities of each product (item) per transaction.

InvoiceDate

datetime

Invoice date and time. The day and time when a transaction was generated.

Price

float64

Unit price. Product price per unit in pounds ().

Customer ID

int64

Customer number. A unique 5-digit integral number is assigned to each customer.

Country

object

Country name. The name of the country where a customer resides.

links to the data 1 : https://drive.google.com/file/d/1KI-aQ09t1I9d4tYDaryKXIiA9_MX5dNG/view?usp=sharing

links to data 2: https://drive.google.com/file/d/1ibogA31HTwdV4wpKtWxXWR0J_QMGda_h/view?usp=sharing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Import necessary libraries import pandas as pd import numpy as np import matplotlibpyplot as plt imp... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting

Authors: Charles E. Davis, Elizabeth Davis

4th Edition

1119577667, 978-1119577669

More Books

Students also viewed these Programming questions

Question

=+b) What is the standard deviation of the sample range?

Answered: 1 week ago

Question

16 Evaluate JIJ ew dydxdz

Answered: 1 week ago

Question

Given find the value of k. es 1 e kx dx = 1 4'

Answered: 1 week ago

Question

What does a current ratio of 2.0 mean?

Answered: 1 week ago