CLiREN-LMS
Data Visualization and Dashboards

Creating Basic Charts with ggplot2

Code Example 1

30-45 minutes Applied Step 7 of 11
Code

Code Example 1

7 / 11
Code

Code Example 1

r

library(tidyverse)

prepared_data |>
  ggplot(aes(x = site)) +
  geom_bar() +
  labs(
    title = "Enrollment by Site",
    x = "Site",
    y = "Number of participants"
  )