A Python-based data analysis project that cleans, processes, and visualizes sales data to uncover actionable business insights. This project demonstrates proficiency in data cleaning, analysis, and visualization, generating reports on revenue, profit, and top-performing products.
- Import and clean CSV sales datasets
- Handle missing and inconsistent data
- Calculate critical metrics: Revenue, Profit, and Top Products
- Create static and interactive visualizations using Matplotlib and Plotly
- Summarize trends for informed business decisions
- Demonstrates strong Pandas skills for data cleaning and analysis
- Highlights ability to process real-world datasets
- Shows competency in visualizing insights for business users
- Perfect for roles like Data Analyst, Junior Analyst, or Data Entry Specialist
Below is a sample revenue analysis report generated by the project:
Below is a sample revenue analysis chart generated by the project.
--
import pandas as pd
import matplotlib.pyplot as plt
import plotly.express as px
# 1️⃣ Load and Clean Data
data = pd.read_csv("sales_data.csv") # Python + Pandas
data.fillna(0, inplace=True)
# 2️⃣ Calculate Metrics
data['Revenue'] = data['Quantity'] * data['UnitPrice']
data['Profit'] = data['Revenue'] - data['Cost']
# Top 5 products by revenue
top_products = data.groupby('Product')['Revenue'].sum().sort_values(ascending=False).head(5)
print("Top 5 Products by Revenue:\n", top_products)
# 3️⃣ Static Visualization with Matplotlib
plt.figure(figsize=(10,6))
data.groupby('Date')['Revenue'].sum().plot(title='Revenue Trend')
plt.xlabel('Date')
plt.ylabel('Revenue')
plt.tight_layout()
plt.savefig("charts/revenue_trend.png")
plt.show()
# 4️⃣ Interactive Visualization with Plotly
fig = px.bar(top_products, x=top_products.index, y='Revenue', title='Top Products Revenue')
fig.write_image("charts/top_products.png")
fig.show()
#sample one chart image
<img width="1817" height="950" alt="revenue chart" src="https://github.com/user-attachments/assets/1e67564d-690a-4ed8-9ca9-b827107395ff" />
#Revenue report
<img width="1817" height="950" alt="revenue chart" src="https://github.com/user-attachments/assets/7d5fe2b4-0094-4c7f-b0d0-13ae91d354f2" />
## 📊 Revenue Report (Sample Output)
Below is a sample revenue analysis report generated by the project:
<img width="1817" height="950" alt="revenue chart" src="https://github.com/user-attachments/assets/7d5fe2b4-0094-4c7f-b0d0-13ae91d354f2" />