-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: wip, articles for showing feedback and participant overview
- Loading branch information
1 parent
ba6b303
commit 6f58a91
Showing
2 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
``` | ||
|