ggplot2 is an R package for creating visualizations based on The Grammar of Graphics (Wilkinson, 2005). Similar to Vega-lite, you can declaratively specify how data values map to properties of graphical primitives. ggplot2 is included in a popular collection of data science packages called tidyverse.
Shiny is an R package for creating interactive web applications with R. By combining ggplot2 and Shiny, you can implement powerful interactive visualizations and dashboards.
library(ggplot2)
data <- data.frame(
cat = c("A", "B", "C", "D", "E", "F", "G", "H", "I"),
value = c(28, 55, 43, 91, 81, 53, 19, 87, 52)
)
ggplot(data, aes(x=cat, y=value)) +
geom_bar(stat="identity")