From 60527f1a96c77999cda779aa67be50f0ee06212a Mon Sep 17 00:00:00 2001 From: Maria Doyle Date: Tue, 24 Sep 2024 18:04:48 +0100 Subject: [PATCH] Add count of instructors and workshops --- carpentries/instructors.qmd | 15 +++++++++++++++ carpentries/workshops.qmd | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/carpentries/instructors.qmd b/carpentries/instructors.qmd index da2a8a8..8a76b5a 100644 --- a/carpentries/instructors.qmd +++ b/carpentries/instructors.qmd @@ -97,6 +97,21 @@ all <- instructors_geocoded |> )) ``` +```{r} +# Count total number of instructors (excluding NA in the name column) +total_instructors <- instructors |> filter(!is.na(name)) |> nrow() + +# Display the total number of instructors with HTML styling +htmltools::HTML( + paste0( + "
", + "Total number of instructors: ", total_instructors, + "
" + ) +) + +``` + ```{r} # Map of instructors lon_limits <- c(-180, 180) diff --git a/carpentries/workshops.qmd b/carpentries/workshops.qmd index b0a677d..e5d0d8d 100644 --- a/carpentries/workshops.qmd +++ b/carpentries/workshops.qmd @@ -82,6 +82,20 @@ workshops_for_map <- workshops %>% workshops_geocoded <- workshops_for_map %>% geocode(Location, method = 'osm', lat = lat, long = lon) +``` +```{r} +# Count total number of workshops (excluding NA in the date column) +total_workshops <- workshops |> filter(!is.na(date)) |> nrow() + +# Display the total number of workshops with HTML styling +htmltools::HTML( + paste0( + "
", + "Total number of workshops: ", total_workshops, + "
" + ) +) + ``` ```{r}