-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.qmd
88 lines (71 loc) · 1.35 KB
/
report.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
title: "Survey Report"
format: html
execute:
echo: false
warning: false
message: false
---
```{r}
library(tidyverse)
library(gt)
```
```{r}
# source("data-raw/import-data.R")
```
```{r}
demographics_data <-
read_rds("data/demographics_data.rds")
favorite_parts_data <-
read_rds("data/favorite_parts_data.rds")
pre_post_data <-
read_rds("data/pre_post_data.rds")
satisfaction_data <-
read_rds("data/satisfaction_data.rds")
```
# Introduction
We did a survey after our trainings. Here is a table showing the demographics of participants.
```{r}
demographics_data |>
gt() |>
opt_interactive()
```
# Findings
```{r}
favorite_parts_data |>
left_join(
demographics_data,
join_by(respondent_id, survey_year)
) |>
count(city, favorite_part) |>
gt() |>
opt_interactive()
```
```{r}
favorite_parts_data |>
count(survey_year, favorite_part) |>
gt() |>
opt_interactive()
```
```{r}
favorite_parts_by_city <-
favorite_parts_data |>
left_join(
demographics_data,
join_by(respondent_id, survey_year)
) |>
count(city, favorite_part)
favorite_parts_by_city_plot <- function(city_name) {
favorite_parts_by_city |>
filter(city == city_name) |>
ggplot(
aes(
x = n,
y = favorite_part
)
) +
geom_col()
}
favorite_parts_by_city_plot(city_name = "Portland")
```
# Conclusion