Class 12 Informatics Practices Project
Project Title: Analysis of Sales and Customer Data of a Local Store
Name: Your Name Here
Class: XII
Roll No: ______
School Name: ______
1. Introduction
This project aims to demonstrate the use of Python libraries (Pandas and Matplotlib) and
SQL for data analysis and visualization. The project is based on simulated sales and
customer data of a local store to gain insights such as sales trends, customer behavior, and
product performance.
2. Objective
The objective of this project is to:
- Import and clean real-world inspired data using Python
- Analyze and visualize data using Pandas and Matplotlib
- Use SQL queries to manage and retrieve data
- Derive meaningful insights from data to assist in business decisions
3. Tools Used
- Python 3
- Pandas Library
- Matplotlib Library
- MySQL
- Jupyter Notebook / PyCharm / VS Code
4. Data Collection
Two CSV files were created to simulate real-world sales and customer data:
- sales_data.csv: Contains data on date-wise sales including product name, price, quantity,
and category.
- customers_data.csv: Contains basic details of customers such as ID, name, age, gender, and
country.
5. Data Analysis using Python
Key operations performed using Pandas:
- Importing CSV files
- Displaying top records
- Grouping sales by product category
- Identifying top selling products
- Merging customer and sales data
6. Data Visualization using Matplotlib
Data was visualized using the Matplotlib library. Types of charts used:
- Bar Chart: Total Sales per Category
- Pie Chart: Sales Distribution by Product
- Line Chart: Monthly Revenue Trend
7. Sample Python Code
import pandas as pd
import matplotlib.pyplot as plt
# Load Data
sales = pd.read_csv('sales_data.csv')
# Group by category
category_sales = sales.groupby('Category')['Total_Amount'].sum()
print(category_sales)
# Plot bar chart
category_sales.plot(kind='bar', title='Total Sales by Category')
plt.xlabel('Category')
plt.ylabel('Total Sales')
plt.tight_layout()
plt.show()
8. SQL Queries
CREATE TABLE Sales (
Sale_ID VARCHAR(10),
Date DATE,
Product VARCHAR(50),
Category VARCHAR(50),
Price INT,
Quantity INT,
Total_Amount INT
);
-- Get sales greater than 500
SELECT * FROM Sales WHERE Total_Amount > 500;
-- Group by Category
SELECT Category, SUM(Total_Amount) FROM Sales GROUP BY Category;
9. Conclusion
Through this project, I learned how to analyze, clean, and visualize data using Pandas and
Matplotlib. I also practiced using SQL queries to manage and retrieve data. This project
enhanced my understanding of real-world data applications in business environments.
10. References
- https://pandas.pydata.org/
- https://matplotlib.org/
- https://www.mysql.com/
- CBSE Informatics Practices Curriculum