Skip to content

Commit

Permalink
Add count of instructors and workshops
Browse files Browse the repository at this point in the history
  • Loading branch information
mblue9 committed Sep 24, 2024
1 parent 7006fe2 commit 60527f1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions carpentries/instructors.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"<div class='instructor-count' style='text-align: center; font-size: 1.2em; font-weight: bold; color: var(--default-body); margin-bottom: 20px; background-color: var(--neutral-n50); padding: 10px; border-radius: 5px;'>",
"Total number of instructors: ", total_instructors,
"</div>"
)
)
```

```{r}
# Map of instructors
lon_limits <- c(-180, 180)
Expand Down
14 changes: 14 additions & 0 deletions carpentries/workshops.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"<div class='workshop-count' style='text-align: center; font-size: 1.2em; font-weight: bold; color: var(--default-body); margin-bottom: 20px; background-color: var(--neutral-n50); padding: 10px; border-radius: 5px;'>",
"Total number of workshops: ", total_workshops,
"</div>"
)
)
```

```{r}
Expand Down

0 comments on commit 60527f1

Please sign in to comment.