This repository contains the ongoing work for a data analysis and preprocessing project focused on an online retail dataset. The dataset includes 541,909 observations and features such as InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, and Country. The goal of this project is to gain insights into customer behavior, sales performance, and product trends through various data analysis techniques.
This project is a work in progress, and I will be adding additional steps and improvements over time. The current steps completed are outlined below, and future enhancements will include advanced analyses and modeling.
The dataset comprises the following features:
- InvoiceNo: A unique identifier for each transaction. This helps in tracking individual purchases.
- StockCode: A unique identifier for each product. This is used to differentiate between different items sold.
- Description: A textual description of the product. This helps in understanding what each item is.
- Quantity: The number of units purchased during the transaction. This is crucial for analyzing sales volume.
- InvoiceDate: The date and time when the transaction occurred. This feature is vital for time-series analysis and seasonal trends.
- UnitPrice: The price per unit of the product. This is important for revenue calculations and price analysis.
- CustomerID: A unique identifier for each customer. This allows for customer segmentation and analysis of purchasing behavior.
- Country: The country where the customer is located, which can help in understanding geographical trends in sales.
Here's a stable link to download the "Online Retail" dataset (in xlsx format) directly from the UCI Machine Learning Repository: Online Retail Dataset
- Download the dataset: Click the link above and save the file (named Online Retail.xlsx) to a directory of your choice.
- Load it in your project: You can then load it in your Jupyter Notebook or Python script using the local path like this:
- import pandas as pd
- Replace 'path/to/your/file.xlsx' with the actual path where you saved the file
df = pd.read_excel('path/to/your/file.xlsx')
To run this project locally, ensure you have Python and Jupyter Notebook installed along with the necessary libraries. You can install the required libraries using pip:
pip install pandas numpy scipy
-
Imported Libraries:
- Pandas
- NumPy
- SciPy
-
Imported the dataset
- Imported the dataset using
pandas
library.
- Imported the dataset using
-
Data Preprocessing:
- Convert Data Types: Ensured that data types are appropriate for analysis.
- Duplicate Tuples: Identified and removed duplicate entries in the dataset.
- Handling Missing Values: Addressed missing data to maintain data integrity.
- Filter Out Unnecessary Data: Removed irrelevant data points to streamline analysis.
- Detecting Outliers (Noise): Identified and dealt with outliers in the dataset.
The following steps will be implemented in the continuation of this project:
- Feature Engineering
- Exploratory Data Analysis (EDA)
- Segmentation and Clustering
- Machine Learning Models
- Visualization and Reporting
Clone this repository and navigate to the project directory:
- Clone the repository:
git clone https://github.com/Ehsan-Behzadi/Online-Retail-Data-Analysis-and-Preprocessing.git cd Online-Retail-Data-Analysis-and-Preprocessing
Next, open the Jupyter Notebook file (usually with a .ipynb extension) using Jupyter Notebook.
- To start Jupyter Notebook:
jupyter notebook