This repository contains Python scripts and Jupyter notebooks for analyzing daily sales data from two bakery stores. The data includes sales records of various bakery products over a year, alongside predictions generated by an AI model. The analysis covers data loading, cleaning, transformation, and exploration using pandas, matplotlib, and scikit-learn libraries.
The dataset (data.csv
) includes:
- date: Date of the sales record
- item_id: Unique identifier of the product
- name: Name of the product
- unit_price: Price per unit in Euros
- waste: Quantity of product wasted daily
- sales_qntty: Quantity of product sold daily
- category: Product category
- store_name: Name of the bakery store
- prediction: AI prediction of daily sales quantity
- Data Loading and Cleaning: Loaded CSV data using pandas, converted data types, and handled missing values.
- Exploratory Data Analysis: Analyzed total sales, waste, and predictions for each store and product.
- Visualizations: Plotted line charts to compare actual sales and AI predictions.
- Modeling: Developed a Linear Regression model to predict sales of a specific product (
item_id = 102
) at store two, evaluated using RMSE and R² score. - Seasonal Analysis: Compared product sales between winter and summer months.
- Performance Metrics: Calculated L2 error of the model on test data (
2021-04
to2021-05
).
- Identified days with highest sales for specific products.
- Determined days each store is open based on available data.
- Estimated potential cost savings if AI predictions were utilized.
- pandas, matplotlib, numpy, scikit-learn
This repository contains the Power BI dashboard for analyzing bakery sales data from two stores over the span of a year. The dashboard provides detailed insights into sales performance, waste management, and prediction accuracy, helping to optimize operations and reduce losses.
- Total Predicted Quantity: Displays the total quantity of items predicted to be sold by the AI model.
- Total Sales in Quantity: Shows the actual total quantity of items sold.
- Total Waste Quantity: Indicates the total quantity of items that went to waste.
- Total Loss in Euros: Displays the total financial loss due to wasted items.
- Total Sold Quantity by Name: A pie chart breaking down the total sold quantity by item name, helping to identify the best-selling products.
- Total Sold Quantities by Days: A line chart showing the quantity sold each day of the week, highlighting peak sales days.
- Total Waste by Days: A bar chart indicating the waste quantity for each day of the week, allowing for better waste management strategies.
- Sales vs Prediction: A bar chart comparing actual sales quantities with AI predictions for each month, showcasing prediction accuracy.
- Total Loss in Euros by Month: A line chart showing the financial loss due to waste for each month, identifying trends and areas for improvement.
- Sales by Category: A bar chart displaying sales quantities categorized by product type, providing insights into category performance.
- Store Name Filter: Allows selection between two bakery stores to compare performance.
- Item Name Filter: Provides the option to view data for specific products.
- Time Duration Filter: Enables analysis over a selected date range.
- Season Filter: Allows seasonal analysis to understand the impact on sales and waste.
This project is licensed under the MIT License - see the LICENSE file for details.