Skip to content

Commit

Permalink
docs: wip, articles for showing feedback and participant overview
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed May 3, 2024
1 parent ba6b303 commit 6f58a91
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vignettes/articles/feedback.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "feedback"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(r3admin)
```
104 changes: 104 additions & 0 deletions vignettes/articles/participants.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: "participants"
output: md_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
results = "asis",
echo = FALSE
)
library(tidyverse)
library(fs)
list_counts <- function(data) {
data %>%
split(data$file_path) %>%
map(~ {
total_participants <- .x %>%
filter(str_detect(Questions, "position")) %>%
pull(Count) %>%
sum() %>%
as.character()
c(
glue::glue(
"**Date of course: {str_extract(unique(.$file_path), '[:digit:]{4}-[:digit:]{2}')}**. Total participants: {total_participants}."
),
"",
.x %>%
group_split(Questions) %>%
map(~ {
c(
glue::glue("{unique(.$Questions)}"),
"",
glue::glue("- {.$Responses}: {.$Count}"),
""
)
}) %>%
unlist()
)
}) %>%
unlist() %>%
cat(sep = "\n")
}
```

From both the introduction and intermediate courses, 17 past participants ended
up instructing or helping with running at least one course.

## Introduction course

```{r}
intro_course <- dir_ls(here::here("../r-cubed/data"), regexp = "[[:digit:]]{4}.*\\.csv$") %>%
read_csv(id = "file_path", col_types = "ccd") %>%
mutate(file_path = path_file(file_path)) %>%
filter(str_detect(Questions, "(city .* work|gender|formal position)"))
intro_course %>%
list_counts()
```

## Intermediate course

```{r}
intermediate_course <- dir_ls(here::here("../r-cubed-intermediate/data"),
regexp = "[[:digit:]]{4}.*\\.csv$"
) %>%
read_csv(id = "file_path", col_types = "ccd") %>%
mutate(file_path = path_file(file_path)) %>%
filter(str_detect(Questions, "(city .* work|gender|formal position)"))
intermediate_course %>%
list_counts()
```

## Participants moving from intro to intermediate

```{r}
source(here::here("vignettes/articles/ignore.R"))
library(googledrive)
library(googlesheets4)
library(tidyverse)
library(lubridate)
conflicted::conflict_prefer("filter", "dplyr")
precourse_intro <-
drive_get(id = INTRO_PRE_SURVEY_ID) %>%
read_sheet() %>%
select(full_name_intro = `What is your full name?`)
precourse_intermediate <-
drive_get(id = INTERMEDIATE_PRE_SURVEY_ID) %>%
read_sheet() %>%
select(full_name_intermediate = `What is your full name?`)
intersect(
precourse_intro %>%
pull(full_name_intro),
precourse_intermediate %>%
pull(full_name_intermediate)
) %>%
length()
```

0 comments on commit 6f58a91

Please sign in to comment.