# Load ggplot2 library
library(ggplot2)
# Create a bar chart to visualize the distribution of categories
ggplot(data, aes(x = Category)) +
geom_bar(aes(fill = Category), position = "dodge") +
theme_minimal() +
labs(
title = "Distribution of Categories",
x = "Categories",
y = "Frequency",
caption = "Source: Your Excel Data"
) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))