📌 Project Introduction and Objective This project was developed as part of the Google Data Analytics Capstone and focuses on analyzing product demand in the retail sector.

📈 An interactive version is available on Tableau Public:[https://public.tableau.com/app/profile/domenico.monteleone/viz/Dashboard-retail-demand-forecast/Dashbordretaildemandforecast]

Objective: Analyze historical order data to identify trends, seasonality, and provide strategic insights for forecasting future demand.

🧹 Data Loading and Cleaning

The dataset is first loaded and cleaned. Here’s a summary of the key steps:

Renamed columns to lowercase and replaced spaces with underscores.

Converted order_demand to numeric, handling negative values.

Removed rows with missing values.

Created a month column to aggregate data.

📊 Analysis 1: Aggregated Monthly Demand

This chart shows how total demand has evolved over time on a monthly basis.

📈 Analysis 2: Seasonality

Demand patterns are evaluated by month and year to identify recurring trends.

🔮 Analysis 3: 3-6 Months Moving Average Forecast

Applied a rolling average to smooth demand and help forecast future trends.

📈 Analysis 4: Top 5 products

Filtered the top 5 products and visualized them with a line chart.

📊 Analysis 5: Annual Demand by Warehouse and Product Category

Color legend
🟥 Dark red = High demand
🟧 Orange = Medium demand
🟨 Light yellow = Low demand

Use the filters above the Warehouse and Product Category columns to explore the data.
The Total column sums the annual demand for each combination. Values are color-coded accordingly.

Data Export for Tableau

write.csv(df, "data/Historical_Product_Demand_Tableau.csv", row.names = FALSE)