# Plot total sales by product
ggplot(cleaned_data, aes(x = reorder(`Product type`, `Price`), y = `Price`)) +
  geom_bar(stat = "identity", fill = "steelblue") +
  coord_flip() + # Flip coordinates to make it horizontal
  labs(title = "Total Sales by Product", x = "Product Type", y = "Total Sales") +
  theme_minimal()

# Plot sales by region
ggplot(cleaned_data, aes(x = `Location`, y = `Price`)) +
  geom_bar(stat = "identity", fill = "purple") +
  labs(title = "Sales by Region", x = "Region", y = "Total Sales") +
  theme_minimal()

# Plot sales distribution by product type
ggplot(cleaned_data, aes(x = `Product type`, y = `Costs`, fill = `Product type`)) +
  geom_boxplot() +
  labs(title = "Sales Distribution by Product Type", x = "Product Type", y = "Sales") +
  theme_minimal()

# Scatter plot of sales vs. quantity
ggplot(cleaned_data, aes(x = `Order quantities`, y = `Price`, color = `Product type`)) +
  geom_point() +
  labs(title = "Sales vs. Quantity", x = "Quantity", y = "Sales") +
  theme_minimal()