Skip to content
0

Report on Motorcycle Sales Data Project

Contributors:

  • Rabiat Ibrahim
  • Oladipo Precious

Table of Contents

  • Introduction (Invalid URL)
  • Accessing data (Invalid URL)
  • Data Exploration and Cleaning (Invalid URL)
  • Data Analysis and Visualisation (Invalid URL)
  • Conclusion and Report (Invalid URL)

(Invalid URL)

Introduction

๐Ÿ“– Background

This report was made base on data from a company that sells motorcycle parts. The data was taken over a three months period running from June to August 2021. The company operates three ware house in a large metropolitan area and sells both wholesales as well as retail.

The aim of this analysis is to help an employee of the company gain some insights on the company's past sales base the data available. Some of the information captured in the analysis are:

  1. Sales by payment method
  2. Average Unit price for each product
  3. Understanding some behaviour of the clients.

๐Ÿ’พ The data

The sales data used for this analysis contains 8 features which are highlighted below:
  • "date" - The date, from June to August 2021.
  • "warehouse" - The company operates three warehouses: North, Central, and West.
  • "client_type" - There are two types of customers: Retail and Wholesale.
  • "product_line" - Type of products purchased.
  • "quantity" - How many items were purchased.
  • "unit_price" - Price per item sold.
  • "total" - Total sale = quantity * unit_price.
  • "payment" - How the client paid: Cash, Credit card, Transfer.

๐Ÿ’ช Challenge

The Question we want to address in this analysis includes:

  1. What are the total sales for each payment method?
  2. What is the average unit price for each product line?
  3. How does the clients behaves in terms of payment method, quantity purchase and the total amount paid?
  4. Which of the warehouse is sells the most?

To answer this question we will :

  1. First the dataset using data manipulation skills with focus on the questions.
  2. Next, create plots to visualize findings.
  3. Finally, summarize our findings.

(Invalid URL)

Accessing Data

Importing The Modules and Loading the Dataset

In this session, we will import all the neccessary modules required for the analysis, exploration and visualization of the dataset.

Next, we load the dataset "sales_data.csv" containing three months of sales data for the company. We will carry out some basic accessment to get more acquainted with the dataste by using functions like head(), info(). We will also check for null and duplicated values using the isnull() and duplicated() respectively.

# Importing the needed modules
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import datetime

# Reading in the sales data
sales = pd.read_csv('data/sales_data.csv', parse_dates = ['date'])

# Take a look at the  first five datapoints
sales.head()

(Invalid URL)

Data Exploration and Cleaning

sales.info()
# Checking for missing values
sales.isnull().sum()
# Checking for duplicated values
sales.duplicated().sum()

Exploration of the dataset shows that each of the 8 features contains 1000 entries. There are no instances of missing or duplicated values. Each columns has taken the correct datatype for example the date column is of the datetime datatype.

We will now proceed to analyse the dataset based on the questions we have set to answered with our analysis.

(Invalid URL)

Data Analysis and Visualisation

Now that we are sure that our sales data is clean. The data is ready for analysis starting with the first question.

Q1: Total sales for each payment method

#Total sales for each payment method
sales_for_payment_type = sales.groupby('payment')['total'].sum().reset_index()
tot_sum=sales_for_payment_type['total'].sum()

#We'll check the percent of total sales by payment type
percentage=sales_for_payment_type['total']/tot_sum*100
sales_for_payment_type['percent_tot']=sales_for_payment_type['total']/tot_sum*100
sales_for_payment_type

From the table above, the total sale realized by ash is 19,199.1. Similarly, total amount realise from credit card and bank transfer are 11,0271.57 and 15,9642.33, respectively.

โ€Œ
โ€Œ
โ€Œ