Skip to content

codewithchirag18/Sale-Analysis-EDA-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

📊 Sales Analysis - EDA Project

📑 Table of Contents


📌 Project Overview

This project is an Exploratory Data Analysis (EDA) on 12 months worth of sales data from an electronics store.
The dataset contains hundreds of thousands of purchases, including details such as month, product type, cost, and purchase address.

The goal of this project is to clean the dataset and then analyze it to answer key business questions using Python Pandas and Matplotlib.


🎯 Objectives

  • Clean and prepare the sales dataset.
  • Perform exploratory data analysis.
  • Answer important business-related questions such as:
    1. What was the best month for sales? How much was earned that month?
    2. What city sold the most products?
    3. What time should advertisements be displayed to maximize purchases?
    4. What product sold the most, and why?

🗂️ Dataset

  • Source: 12 separate monthly CSV files combined into one dataset.
  • Location:Multiple CSV files located in /data/ folder
  • Features include:
    • Order ID
    • Product
    • Quantity Ordered
    • Price Each
    • Order Date
    • Purchase Address

🔧 Tools & Libraries

  • Python 🐍
  • Pandas – Data manipulation & analysis
  • Matplotlib – Data visualization
  • Jupyter Notebook – Development & exploration
  • Github

🛠️ Data Cleaning

Before analysis, the dataset was cleaned with the following steps:

  • Dropped NaN values from DataFrame.
  • Removed rows based on conditions (e.g., invalid entries).
  • Converted column types using:
    • pd.to_numeric
    • pd.to_datetime
    • .astype()

📊 Data Exploration & Analysis

After cleaning, we performed analysis to answer business questions:

  1. Best Month for Sales

    • Calculated total sales per month.
    • Identified the month with the highest revenue.
  2. City with Most Sales

    • Extracted city information from purchase addresses.
    • Grouped sales by city and visualized results.
  3. Optimal Advertisement Time

    • Converted Order Date to datetime.
    • Analyzed purchase frequency by hour.
    • Suggested peak hours for displaying ads.
  4. Most Sold Product & Reason

    • Counted product quantities sold.
    • Compared with pricing trends.
    • Derived insights into popularity vs affordability.

📈 Methods & Techniques Used

  • Concatenating CSVspd.concat()
  • Feature Engineering → Creating new columns from existing ones
  • String Parsing.str methods
  • Apply Function.apply() for transformations
  • Grouping & Aggregation.groupby()
  • Visualizations → Bar charts & line graphs
  • Graph Labeling for better interpretation

📂 Project Structure


📦 Insurance-Cost-Analysis-EDA-Regression-Python
│
├── README.md
├── .gitignore
├── notebooks/                  # Jupyter notebooks
│   ├── exploratory_data_analysis.ipynb
├── data/                
    └──data/Sales_January_2019.csv
    └──data/Sales_February_2019.csv
    └──data/Sales_March_2019.csv
    └──data/Sales_April_2019.csv
    └──data/Sales_May_2019.csv
    └──data/Sales_June_2019.csv
    └──data/Sales_July_2019.csv
    └──data/Sales_August_2019.csv
    └──data/Sales_September_2019.csv
    └──data/Sales_October_2019.csv
    └──data/Sales_November_2019.csv
    └──data/Sales_DEcember_2019.csv

🚀 How to Run the Project

  1. Clone the repository:
    git clone https://github.com/codewithchirag18/Insurance-Cost-Analysis-EDA-Regression-Python.git
  2. Navigate to the folder:
bash
Copy code
cd sales-analysis-eda
  1. Install required libraries:
bash
Copy code
pip install -r requirements.txt
  1. Open Jupyter Notebook:
bash
Copy code
jupyter notebook exploratory_data_analysis.ipynb

📌 Future Improvements

  • Automate data cleaning & analysis pipeline.

  • Add interactive dashboards using Streamlit or Tableau.

  • Use Machine Learning to forecast future sales.


Author & Contact

Chirag Tomar Data Analyst 📧 Email: tomarchirag431@gmail.com 🔗 LinkedIn 🔗 LeetCode

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published