Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update summary quarto #83

Merged
merged 6 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ temp/
*.rda
exploratory_scripts/
docs/
docs/summary_qa.html
quarto/qa/summary_qa.html
quarto/summary_qa_files/
6 changes: 4 additions & 2 deletions R/frequency-tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sample_sizes <- function(data) {
list(
all = nrow(data),
code_at_work = sum(!is.na(data$code_freq) & data$code_freq != "Never"),
other_code_experience = sum(!is.na(data$code_freq) & data$code_freq != "Never" & data$other_coding_experience == "Yes"),
other_code_experience = sum(!is.na(data$code_freq) & data$code_freq != "Never" & data$other_coding_experience == "Yes" & data$first_learned != "Current employment"),
heard_of_RAP = sum(!is.na(data$code_freq) & data$code_freq != "Never" & data$heard_of_RAP == "Yes"),
not_RAP_champ = sum(is.na(data$know_RAP_champ) | data$know_RAP_champ != "I am a RAP champion"),

Expand Down Expand Up @@ -600,6 +600,8 @@ summarise_ability_change <- function(data, sample = FALSE) {
stop("unexpected_input: no column called 'coding_ability_change'")
}

data <- data[data$first_learned != "Current employment", ]

questions <- "coding_ability_change"

levels <- c("It has become significantly worse",
Expand Down Expand Up @@ -790,7 +792,7 @@ summarise_cap_change_by_freq <- function(data, sample = FALSE){

col2 <- "coding_ability_change"

data <- dplyr::filter(data, (code_freq != "Never" & other_coding_experience == "Yes"))
data <- dplyr::filter(data, (code_freq != "Never" & other_coding_experience == "Yes" & data$first_learned != "Current employment"))

levels1 <- c(
"Rarely",
Expand Down
20 changes: 11 additions & 9 deletions quarto/main/summary_qa.qmd → quarto/QA/summary_qa.qmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
title: "Summary QA"
execute:
echo: false
output:
html:
self-contained: true
---

```{r echo=FALSE}
```{r echo=FALSE, output=FALSE}
library(magrittr)

data <- CARS::get_tidy_data_file("2023_data.csv") %>%
Expand Down Expand Up @@ -113,7 +115,7 @@ if(tables$knowledge$sample[1] != exp_samples$all) {

#### Open source capability
Check percentages are correct from the data in the table:
```{r}
```{r echo = FALSE}
knitr::kable(CARS::summarise_os_vs_prop(all_wave_data))
```

Expand All @@ -123,7 +125,7 @@ Check percentages are correct from the data in the table (final column = group s
knitr::kable(tables$languages_by_prof)
```
Denominator check - numbers of respondents in each profession, cross check with above:
```{r}
```{r echo = FALSE}
raw_data %>%
tidyr::pivot_longer(contains("prof"), names_to = "prof", values_to = "value") %>%
dplyr::group_by(prof) %>%
Expand All @@ -132,7 +134,7 @@ raw_data %>%
```
#### Access to git
Check data against figure, check proportions are correct
```{r}
```{r echo = FALSE}
knitr::kable(tables$git_access)
```
Denominator check:
Expand Down Expand Up @@ -179,7 +181,7 @@ if(tables$ability_change$sample[1] != exp_samples$other_code_experience) {

#### Ability change by frequency
Check data against figure, check proportions are correct
```{r}
```{r echo = FALSE}
knitr::kable(tables$capability_change_by_freq)
```

Expand All @@ -198,13 +200,13 @@ if(tables$capability_change_by_freq$sample[1] != exp_samples$other_code_experien
## RAP
#### Awareness of RAP
Check that the percentages in the chart and the figures in the text are correct
```{r}
```{r echo = FALSE}
knitr::kable(CARS::summarise_rap_awareness_over_time(all_wave_data))
```

#### RAP knowledge
Check data against figure, check proportions are correct
```{r}
```{r echo = FALSE}
knitr::kable(tables$rap_knowledge)
```

Expand All @@ -221,7 +223,7 @@ if(tables$rap_knowledge$sample[1] != exp_samples$code_at_work) {

#### RAP champs
Check data against figure, check proportions are correct
```{r}
```{r echo = FALSE}
knitr::kable(tables$rap_champ_status)
```

Expand All @@ -238,7 +240,7 @@ if(tables$rap_champ_status$sample[1] != exp_samples$heard_of_RAP) {

#### RAP strategy knowledge
Check data against figure, check proportions are correct
```{r}
```{r echo = FALSE}
knitr::kable(tables$strategy_knowledge)
```

Expand Down
2 changes: 1 addition & 1 deletion quarto/main/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project:
output-dir: ../../docs/

website:
title: Coding in Analysis and Research Survey 2022
title: Coding in Analysis and Research Survey 2023
navbar:
background: primary
left:
Expand Down
Loading
Loading