CLiREN-LMS
Data Visualization and Dashboards

Enrollment and Follow-Up Monitoring Plots

Code Example 1

30-45 minutes Applied Step 6 of 10
Code

Code Example 1

6 / 10
Code

Code Example 1

r

cumulative_enrollment <- prepared_data |>
  distinct(participant_id, enrollment_date, site) |>
  arrange(enrollment_date) |>
  mutate(cumulative_participants = row_number())

cumulative_enrollment |>
  ggplot(aes(x = enrollment_date, y = cumulative_participants)) +
  geom_line() +
  labs(
    title = "Cumulative Enrollment Over Time",
    x = "Enrollment date",
    y = "Cumulative participants"
  )