Python
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

# Sample sales data
data = {
    'Date': pd.date_range('2023-01-01', periods=180, freq='D'),
    'Product': ['Product A', 'Product B', 'Product C'] * 60,
    'Region': ['North', 'South', 'East', 'West'] * 45,
    'Sales': [100, 150, 120, 200, 250, 300] * 30,
    'Quantity Sold': [10, 12, 15, 8, 20, 30] * 30
}

sales_df = pd.DataFrame(data)

# Extracting month and region
sales_df['Month'] = sales_df['Date'].dt.month

# Grouping data by product, region, and month
grouped_sales = sales_df.groupby(['Product', 'Region', 'Month'])['Sales'].sum().unstack()

# Plotting the heatmap
plt.figure(figsize=(10, 6))
sns.heatmap(grouped_sales, annot=True, cmap='RdYlGn', linewidths=0.5)
plt.title('Total Sales by Product, Region, and Month')
plt.show()