library(ggplot2)
#1 Bar Chart: Market Size of Probiotics in India (2020–2030)
years <- 2020:2030
size <- c(2.1, 2.5, 3.0, 3.7, 4.5, 5.4, 6.5, 7.8, 9.2, 10.8, 12.5) # Market size in billion USD
df_size <- data.frame(Year = years, Size = size)

ggplot(df_size, aes(x=Year, y=Size)) + 
  geom_bar(stat="identity", fill="blue") +
  ggtitle("Market Size of Probiotics in India (2020-2030)") +
  xlab("Year") +
  ylab("Market Size (Billion USD)") +
  theme_minimal()

#2 Pie Chart: Consumer Preference for Probiotic Products
pref <- data.frame(Category = c("Yogurt", "Drinks", "Supplements"), 
                   Value = c(50, 30, 20)) # Percentage distribution

ggplot(pref, aes(x="", y=Value, fill=Category)) + 
  geom_bar(stat="identity", width=1) + 
  coord_polar("y") +
  ggtitle("Consumer Preference for Probiotic Products") +
  theme_void()

#3 Pie Chart: Market Share of Probiotic Brands
brands <- data.frame(Brand = c("Yakult", "Nestlé", "Amul", "Others"), 
                      Share = c(35, 25, 15, 25)) # Market share in percentage

ggplot(brands, aes(x="", y=Share, fill=Brand)) + 
  geom_bar(stat="identity", width=1) + 
  coord_polar("y") +
  ggtitle("Market Share of Probiotic Brands in India") +
  theme_void()

#4 Line Graph: CAGR Comparison with Other Asian Countries
years <- 2020:2030
cagr_data <- data.frame(
  Year = rep(years, 2),
  CAGR = c(seq(5, 15, length.out=11), seq(6, 12, length.out=11)),
  Country = rep(c("India", "China"), each=11)
)

ggplot(cagr_data, aes(x=Year, y=CAGR, color=Country)) +
  geom_line(size=1) +
  geom_point() +
  ggtitle("CAGR Comparison: India vs China") +
  xlab("Year") +
  ylab("CAGR (%)") +
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.