-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.qmd
3120 lines (2268 loc) · 87.6 KB
/
index.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "Summaries of initial survey responses"
subtitle: "Equity, diversity, and inclusion in the PsychoPy community"
author:
name: "Patrick Bolger, PhD | Community Development Champion"
affiliation: "School of Psychology at the University of Nottingham"
date: now
date-format: "D MMM YYYY, h:mm a"
bibliography: bibs/grateful-refs-sumandvis.bib
csl: bibs/apa.csl
---
```{r}
#| label: turnWarningsOff
options(warn=-1)
```
```{r}
#| label: getAndAttachPackages
#| output: false
#| warning: false
#| message: false
# list the required packages
packagesRequired <-
c(
"colorblindcheck",
"dplyr",
"DT",
"flextable",
"forcats",
"gdata",
"ggplot2",
"ggtext",
"grateful",
"gtsummary",
"knitr",
"magrittr",
"purrr",
"readr",
"rmarkdown",
"showtext",
"sjlabelled",
"sjmisc",
"sjPlot",
"stringr",
"sysfonts",
"systemfonts",
"summarytools",
"tibble",
"tidyr",
"tidyselect",
"xfun"
)
# Un-comment the code below to install any packages you're missing from the
# list in packagesRequired
# packagesInstalled <- installed.packages()[,"Package"]
# packagesMissing <- packagesRequired[!(packagesRequired %in% packagesInstalled)]
# if(length(packagesMissing)) install.packages(packagesMissing, repos = getCRANmirrors()[1,"URL"])
# attach the packages
invisible(lapply(packagesRequired, require, character.only=T))
```
```{r}
#| label: getFontRaleway
#| output: false
## use *raleway* font throughout
## an active internet connection is required for this step
font_add_google("Raleway", "raleway")
showtext_auto()
```
```{r}
#| label: readTidiedData
#| output: false
# source of data
# The data imported here was pre-processed in another *R* script.
# Read in the data that was saved as .rds output in tidyingAndFormatting.qmd
visMain <- readRDS("data/tidyLabeledSurveyData.rds")
```
```{r}
#| label: importCustomFunctions
# This attaches custom themes and functions to reduce clutter and increase efficiency
source("themesAndFunctions.R")
```
# introduction
This report summarises the findings of a survey sent out to the *PsychoPy* community between 28 November 2022 and 16 March 2023. The topic was equity, diversity, and inclusion (EDI) in the *PsychoPy* community.
::: {.callout-note title="Funding"}
The development of the survey was funded by a grant from the [Essential Open Source Software for Science](https://chanzuckerberg.com/eoss/) program at the [Chan Zuckerberg Inititiative](https://chanzuckerberg.com/). Here is the [project page at CZI](https://chanzuckerberg.com/eoss/proposals/raising-diversity-and-internationalization-in-psychopy/).
:::
It was the first, baseline version, of two identical surveys to be sent out. The second will be sent out in 2024.
It was sent out as an *announcement* to the [PsychoPy User Forum](https://discourse.psychopy.org/) on the [Discourse platform](https://discourse.org/). It was also sent out by email to a list of authors generated through a cited-reference search on the [Web of Science](https://clarivate.com/products/scientific-and-academic-research/research-discovery-and-workflow-solutions/webofscience-platform/). Specifically, these authors published multiple research studies citing one or more papers authored (or co-authored) by Jonathan Peirce over the past two decades about *PsychoPy*.
The survey contained between 25-75 questions, depending on how participants responded.
Responses were all anonymous. That is, nowhere do we have any record of who, exactly, replied to the survey.
There were three main parts to the survey:
- participant background\
- EDI experience\
- guidance
*Participant background* asked participants about their career status, the degree to which they were engaged in the PsychoPy community, how they contributed to the project, and if there was anything that deterred them from contributing more than they already do.
Below are the full survey categories in more detail, roughly in order of the original presentation.
- Professional & *PsychoPy* background\
- career status\
- type of engagement with *PsychoPy*<sup>®</sup>\
- ways of contributing\
- deterrents to contributing\
- EDI experience\
- gender\
- sexual orientation\
- race and/or culture\
- disability and/or neurodivergence\
- language dominance\
- *PsychoPy* Guidance\
- awareness of *Code of Conduct*\
- findability, searchability, & accessibility of documentation\
- trust in enforcement of *Code of Conduct*
## general
## original order of presentation
The original presentation of the survey begins with *professional and PsychoPy background* questions. It then proceeds to issues of equity, diversity, and inclusion (*EDI*) for respondents who indicated that they not only are part of a particular identity of interest, but also feel they have been affected somehow by having that identity in the *PsychoPy* community. The survey finished with a few questions about the *Code of Conduct* and *documentation*, which we will simply call *PsychoPy guidance*. Thus:
- *Professional and PsychoPy background*\
- *EDI experience*\
- *PsychoPy guidance*
Each participant saw the all of the *professional and PsychoPy background* items on the survey, as well as the *PsychoPy guidance* items. In the section on *EDI experience*, each respondent saw at least one of the questions, with the exception of *gender*, in which case everyone saw at least two.
The one EDI questions that everyone saw had to do with whether they identified with, or was typically associated with, one of the EDI groups. In the case of *gender*, they simply indicated what their gender was, or if it was not listed.
If they answered *yes* to any particular EDI question (or any response for *gender*), two more questions appeared. The first invited them to supply more specific information about that particular aspect of their identity, but only if they wanted to. The second had to do with whether they felt that this particular aspect of their identity had affected their interactions in the *PsychoPy*<sup>®</sup> community.
Importantly, this latter question determined whether participants saw a further eight questions regarding that particular identity. If they answered *yes*, they saw those questions a little bit later in the survey. If they answered *no*, they did not.
This has an important implication. Namely, although one may identify or be associated with a particular identity, that does not necessarily mean that one feels that it had affected one's interactions in the *PsychoPy*<sup>®</sup> community. Indeed, there were many participants throughout the survey who felt that although they are associated with a particular identity, it had not affected their interactions.
Recall that for the dimension of *gender*, everyone saw the question concerning whether they felt that their interactions had suffered as a result of gender. This is because everyone has a gender identity, so there was no logical way of excluding anyone from seeing the subsequent community-interaction question.
## order of data summaries
Each of the headings in the list above above is depicted below with a visualization, followed by a table of the data, and in the cases of identity, a table of labels that some participants optionally supplied to describe themselves on that particular EDI variable.
Ultimately however, it makes more sense to present the data summaries in a different order. Specifically, it would be informative to see how the background variables and related issues interact with the EDI variables. Therefore, the background and guidance variables are presented *after* the EDI variables, giving us a data-summary order as follows:
- *EDI experience*\
- *Professional & PsychoPy background*\
- *PsychoPy Guidance*
Each background and guidance variable is presented in isolation first, but then followed by two-way interactions with the EDI variables of *gender*, *sexual orientation*, *race/culture*, *disability/neurodivergence*, and *written-English language dominance*. In some cases, the interactions with the latter four EDI variables are presented in a single figure.
To the extent possible, each summary is available as a link in the sidebar. However, some interactions were grouped together and don't have links, *per se*. Most commonly, interactions with *gender* are linked, followed by interactions with *other EDI variables*.
Note that none of the questions required responses. This means that there will be plenty of non-responses in the summaries below. These are indicated as either *NA* or *missing*.
---
# data summaries
## participant EDI experience
The second group of items on the survey (again, presented first here) collected information about selected dimensions of equity, diversity, and inclusion, namely *gender*, *sexual orientation*, *race* and/or *culture*, *disability* and/or *neurodivergence*, and *language dominance*.
For each dimension, participants were asked if they identified with the dimension, or whether they thought that others would associate them with it, along with the optional opportunity to supply more information about their own specific identity along this dimension.
Crucially, they were also asked whether they felt that that identity or association had affected their interactions in the *PsychoPy*<sup>®</sup> community. If they answered in the affirmative, they saw eight more questions related to this identity shortly thereafter in the survey.
Thus, the reader will notice that the sample sizes uniformly differ greatly between those who answered the background questions, and those who answered the eight further questions.
These eight further questions fell into three categories in the manner shown below:
- ***Treatment by others***\
- *negative perception*\
- *need to hide identity*\
- *dismissiveness towards contributions*\
- *target of derisive comments*\
- *target of microaggressions*\
- ***Self-regard***\
- *self-doubt*\
- *stereotype threat*\
- ***Isolation***\
- *a desire to interact with others more like themselves*
Participants could agree or disagree with each of these statements using a `1`-`7` Likert scale, where `1` indicated *Strongly disagree* and a `7` indicated *Strongly agree*.
::: {.callout-note}
Note that on the `1`-`7` scale for each of the statements, the number `4` is directly in the middle of the scale, which can be interpreted as neither agreeing nor disagreeing. You will see that we set responses of `4` to the side of the respective stacked frequency barplots, in yellow.
Also, the barplots are sorted within each category (*treatment*, *self-regard*, and *isolation*) along descending frequency of agreement. That is, the topmost barplot within each category is the one with highest number of agreements, whereas the bottom-most barplot within each category is the one with the highest number of disagreements.
:::
Summaries of the responses to these statements are provided below after the respective questions concerning their identity.
### gender
The first EDI category is *gender*. We present the responses to the issue of identity, followed by a table of descriptions (supplied by some of the participants). This is followed by whether the participant felt affected in the *PsychoPy*<sup>®</sup> community by that identity. Finally, we summarise the participants responses to items listed under *treatment* (by others), *self-regard*, and *isolation*.
#### identity
The sections directly below summarise, both visually and verbally, the answer to the following question:
>`r get_label(visMain$gender)`
##### figure
```{r}
#| label: gender-plot
#| fig-alt: "Barplot of responses to the following statement: 'Which gender do you identify most with?'"
visMain |>
select(gender) |>
mutate(gender = forcats::fct_na_value_to_level(gender, level = "(missing)")) |>
freqPlot(
ostColour = ostBlue,
sorting = "none"
)
gdata::mv("p", "GnWh") # p is sent to the global env. from the function
suppressWarnings(print(GnWh))
```
##### table
```{r}
#| label: gender-count-table
#| tbl-cap: "Summary of responses to gender."
#| output: asis
visMain |>
select(gender) |>
mutate(gender = forcats::fct_na_value_to_level(gender, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
##### descriptions
If participants chose ***not listed*** as an answer above, they were given the opportunity to describe their gender in their own words, though doing so was optional. For those who did, the table below lists the descriptions they provided. The "NA" in the table refers to those who either did not see the question or chose not to supply a description.
The question was as follows:
>`r get_label(visMain$genderDesc)`
```{r}
#| label: gender-desc-table
#| tbl-cap: Descriptions of gender identities volunteered by participants
visMain |>
count(genderDesc) |>
arrange(desc(n)) |>
datatable(
class = 'cell-border stripe',
colnames = c(
"Feel free to describe your gender here (or not)",
"count"
),
options = list(
columnDefs = list(
list(
targets = 1,
render = JS(
"function(data, type, row, meta) {",
"return data === null ? 'NA' : data;",
"}"
)
)
)
)
)
```
---
#### felt affected
The sections directly below summarise, both visually and verbally, the answer to the following question:
>`r get_label(visMain$genderAffected)`
##### figure
```{r}
#| label: gender-affected-plot
#| fig-alt: "Barplot of responses to: 'Do you feel that your gender status has affected your interactions with the PsychoPy community or software ecosystem?'"
visMain |>
select(genderAffected) |>
mutate(genderAffected = forcats::fct_na_value_to_level(genderAffected, level = "(missing)")) |>
freqPlot(
ostColour = ostOrange,
sorting = "none"
)
gdata::mv("p", "GnFa") # p is sent to the global env. from the function
suppressWarnings(print(GnFa))
```
##### table
```{r}
#| label: gender-felt-affected-count-table
#| tbl-cap: "Summary of responses to whether participants felt affected by their gender identity."
#| output: asis
visMain |>
select(genderAffected) |>
mutate(genderAffected = forcats::fct_na_value_to_level(genderAffected, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
::: {.callout-important}
Important: The question directly above regarding gender determined whether or not the participant saw the respective items directly below regarding *treatment (by others)*, *self-regard*, and *isolation*.
:::
---
#### treatment, self-regard, isolation
The following statements were seen only by the subset of participants noted above. Specifically, they were restricted to the **`r numbers_to_words(length(which(visMain$genderAffected=="Yes")))`** who replied ***yes*** to the question asking them whether they had felt that their gender identity has affected their interactions with the *PsychoPy*<sup>®</sup> community. Of those, **`r numbers_to_words(length(which(!is.na(visMain$genderNegPerc))))`** provided responses, seen below.
The exact questions are listed in the verbal summary after the visualization.
##### figure
```{r}
#| label: gender-likert-plot
#| warning: false
#| fig-alt: "Stacked frequency barplots of responses to several statements on gender, categorised into the following: treatment by others, self-regard, and isolation."
visMain |>
select(genderNegPerc:genderOthersLikeMe) |>
stackedLikertGroups(likertTitle = "Gender")
gdata::mv("p", "GnLk") # p is sent to the global env. from the function
suppressWarnings(print(GnLk))
```
##### table
```{r}
#| label: gender-stats-table
#| tbl-cap: "Statistics for responses to statements regarding gender"
#| output: asis
visMain |>
select(genderNegPerc:genderOthersLikeMe) |>
likertTable(
lowerBound = "1 = Strongly disagree",
upperBound = "7 = Strongly agree",
byVar = NULL,
spanVar <- NULL
)
```
<!-- {{< include notes/_gender.md >}} -->
---
### sexual orientation
The second EDI category is *sexual orientation*. As above, we present the responses to the issue of identity, followed by a table of descriptions (supplied by some of the participants). This is followed by whether the participant felt affected in the *PsychoPy*<sup>®</sup> community by that identity. Finally, we summarise the participants responses to items listed under *treatment* (by others), *self-regard*, and *isolation*.
#### identity
##### figure
```{r}
#| label: nonhetero-plot
#| fig-alt: "Barplot of responses to the following: 'Do you, or might others who know you well, consider you somehow NOT to be part of the heterosexual community?'"
visMain |>
select(nonHeteroCommunity) |>
mutate(nonHeteroCommunity = forcats::fct_na_value_to_level(nonHeteroCommunity, level = "(missing)")) |>
freqPlot(
ostColour = ostYellow,
sorting = "none"
)
gdata::mv("p", "NhId") # p is sent to the global env. from the function
suppressWarnings(print(NhId))
```
##### table
```{r}
#| label: sexuality-count-table
#| tbl-cap: "Summary of responses to sexual orientation"
#| output: asis
visMain |>
select(nonHeteroCommunity) |>
mutate(nonHeteroCommunity = forcats::fct_na_value_to_level(nonHeteroCommunity, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
---
##### descriptions
If participants chose ***yes*** as an answer above, they were given the opportunity to describe their sexual identity, though doing so was optional. For those who did, the table below lists the descriptions they provided. The "NA" in the table refers to those who either did not see the question or chose not to supply a description.
The question was as follows:
>`r get_label(visMain$nonHeteroDesc)`
```{r}
#| label: nonhetero-desc-table
#| tbl-cap: "Descriptions of sexual orientation volunteered by participants"
visMain |>
count(nonHeteroDesc) |>
arrange(desc(n)) |>
datatable(
class = 'cell-border stripe',
colnames = c(
"Feel free to describe your sexual orientation here (or not)",
"count"
),
options = list(
columnDefs = list(
list(
targets = 1,
render = JS(
"function(data, type, row, meta) {",
"return data === null ? 'NA' : data;",
"}"
)
)
)
)
)
```
---
#### felt affected
The sections directly below summarise, both visually and verbally, the answer to the following question:
>`r get_label(visMain$nonHeteroAffected)`
##### figure
```{r}
#| label: nonhetero-affected-plot
#| fig-alt: "Barplot of responses to the following: 'Do you feel that your sexual orientation has affected your interactions with the PsychoPy community...?'"
visMain |>
select(nonHeteroAffected) |>
mutate(nonHeteroAffected = forcats::fct_na_value_to_level(nonHeteroAffected, level = "(missing)")) |>
freqPlot(
ostColour = ostBlue,
sorting = "none"
)
gdata::mv("p", "NhFa") # p is sent to the global env. from the function
suppressWarnings(print(NhFa))
```
##### table
```{r}
#| label: sexuality-felt-affected-count-table
#| tbl-cap: "Summary of responses to whether participants felt affected by their sexual orientation"
#| output: asis
visMain |>
select(nonHeteroAffected) |>
mutate(nonHeteroAffected = forcats::fct_na_value_to_level(nonHeteroAffected, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
::: {.callout-important}
Important: The question directly above regarding sexual orientation determined whether or not the participant saw the respective items directly below regarding *treatment (by others)*, *self-regard*, and *isolation*.
:::
---
#### treatment, self-regard, isolation
The following statements were seen only by the subset of participants noted above. Specifically, they were restricted to the **`r numbers_to_words(length(which(visMain$nonHeteroAffected=="Yes")))`** who replied ***yes*** to the question asking them whether they had felt that their sexual orientation has affected their interactions with the *PsychoPy*<sup>®</sup> community. Of those, **`r numbers_to_words(length(which(!is.na(visMain$nonHeteroNegPerc))))`** provided responses, seen below.
The exact questions are listed in the verbal summary after the visualization.
##### figure
```{r}
#| label: nonhetero-likert-plot
#| warning: false
#| fig-alt: "Stacked frequency barplots of responses to several statements on sexuality, categorised into the following: treatment by others, self-regard, and isolation."
visMain |>
select(nonHeteroNegPerc:nonHeteroOthersLikeMe) |>
stackedLikertGroups(likertTitle = "Non-heterosexuality")
gdata::mv("p", "NhLk") # p is sent to the global env. from the function
suppressWarnings(print(NhLk))
```
##### table
```{r}
#| label: nonhetero-stats-table
#| tbl-cap: "Statistics for responses to statements regarding sexual orientation"
#| output: asis
visMain |>
select(nonHeteroNegPerc:nonHeteroOthersLikeMe) |>
likertTable(
lowerBound = "1 = Strongly disagree",
upperBound = "7 = Strongly agree",
byVar = NULL,
spanVar <- NULL
)
```
<!-- {{< include notes/_nonhetero.md >}} -->
---
### race / culture
The third EDI category is *race* and/or *culture*. As before, we present the responses to the issue of identity, followed by a table of descriptions (supplied by some of the participants). This is followed by whether the participant felt affected in the *PsychoPy*<sup>®</sup> community by that identity. Finally, we summarise the participants responses to items listed under *treatment* (by others), *self-regard*, and *isolation*.
#### identity
##### figure
```{r}
#| label: raceculture-plot
#| fig-alt: "Barplot of responses to: 'Do you, or might others who know you well, consider you part of a race/culture that is potentially discriminated against?'"
visMain |>
select(raceCulture) |>
mutate(raceCulture = forcats::fct_na_value_to_level(raceCulture, level = "(missing)")) |>
freqPlot(
ostColour = ostOrange,
sorting = "none"
)
gdata::mv("p", "RcId") # p is sent to the global env. from the function
suppressWarnings(print(RcId))
```
##### table
```{r}
#| label: race-count-table
#| tbl-cap: "Summary of responses to race and/or culture"
#| output: asis
visMain |>
select(raceCulture) |>
mutate(raceCulture = forcats::fct_na_value_to_level(raceCulture, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
---
##### descriptions
If participants chose ***yes*** as an answer above, they were given the opportunity to describe their race(s) and/or culture(s), though doing so was optional. For those who did, the table below lists the descriptions they provided. The "NA" in the table refers to those who either did not see the question or chose not to supply a description.
The question was as follows:
>`r get_label(visMain$raceCultureDesc)`
```{r}
#| label: raceculture-desc-table
#| tbl-cap: Descriptions of race and/or culture volunteered by participants
visMain |>
count(raceCultureDesc) |>
arrange(desc(n)) |>
datatable(
class = 'cell-border stripe',
colnames = c(
"Feel free to describe your race and/or culture here (or not)",
"count"
),
options = list(
columnDefs = list(
list(
targets = 1,
render = JS(
"function(data, type, row, meta) {",
"return data === null ? 'NA' : data;",
"}"
)
)
)
)
)
```
---
#### felt affected
The sections directly below summarise, both visually and verbally, the answer to the following question:
>`r get_label(visMain$raceCultureAffected)`
##### figure
```{r}
#| label: raceculture-affected-plot
#| fig-alt: "Frequency barplot of responses to the following statement: 'Do you feel that your race and/or culture has affected your interactions with the PsychoPy community or software ecosystem?' If participants chose to respond, they could respond with either 'yes' or 'no.'"
visMain |>
select(raceCultureAffected) |>
mutate(raceCultureAffected = forcats::fct_na_value_to_level(raceCultureAffected, level = "(missing)")) |>
freqPlot(
ostColour = ostYellow,
sorting = "none"
)
gdata::mv("p", "RcFa") # p is sent to the global env. from the function
suppressWarnings(print(RcFa))
```
##### table
```{r}
#| label: race-felt-affected-count-table
#| tbl-cap: "Summary of responses to whether participants felt affected by their race and/or culture"
#| output: asis
visMain |>
select(raceCultureAffected) |>
mutate(raceCultureAffected = forcats::fct_na_value_to_level(raceCultureAffected, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
::: {.callout-important}
Important: The question directly above regarding race and/our culture determined whether or not the participant saw the respective items directly below regarding *treatment (by others)*, *self-regard*, and *isolation*.
:::
---
#### treatment, self-regard, isolation
The following statements were seen only by the subset of participants noted above. Specifically, they were restricted to the **`r numbers_to_words(length(which(visMain$raceCultureAffected=="Yes")))`** who replied ***yes*** to the question asking them whether they had felt that their racial and/or cultural identity has affected their interactions with the *PsychoPy*<sup>®</sup> community. Of those, **`r numbers_to_words(length(which(!is.na(visMain$raceCultureNegPerc))))`** provided responses, seen below.
The exact questions are listed in the verbal summary after the visualization.
##### figure
```{r}
#| label: raceculture-likert-plot
#| warning: false
#| fig-alt: "Stacked frequency barplots of responses to statements on race/culture, categorised into the following: treatment by others, self-regard, and isolation."
visMain |>
select(raceCultureNegPerc:raceCultureOthersLikeMe) |>
stackedLikertGroups(
likertTitle = "Race(s) and/or Culture(s)"
)
gdata::mv("p", "RcLk") # p is sent to the global env. from the function
suppressWarnings(print(RcLk))
```
##### table
```{r}
#| label: raceculture-stats-table
#| tbl-cap: "Statistics for responses to statements regarding race and/or culture"
#| output: asis
visMain |>
select(raceCultureNegPerc:raceCultureOthersLikeMe) |>
likertTable(
lowerBound = "1 = Strongly disagree",
upperBound = "7 = Strongly agree",
byVar = NULL,
spanVar <- NULL
)
```
<!-- {{< include notes/_raceculture.md >}} -->
---
### disability / neurodivergence
The fourth EDI category is *disability* and/or *neurodivergence*. As above, we present the responses to the issue of identity, followed by a table of descriptions (supplied by some of the participants). This is followed by whether the participant felt affected in the *PsychoPy*<sup>®</sup> community by that identity. Finally, we summarise the participants responses to items listed under *treatment* (by others), *self-regard*, and *isolation*.
#### identity
##### figure
```{r}
#| label: disability-plot
#| fig-alt: "Frequency barplot of responses to the following question: 'Do you, or might others who know you well, consider you disabled and/or neurodivergent (i.e., visible or invisible; e.g., blind, paralysed, cerebral palsy, ASD, ADHD)?' If participants chose to respond, they could respond with either 'yes' or 'no.'"
visMain |>
select(disability) |>
mutate(disability = forcats::fct_na_value_to_level(disability, level = "(missing)")) |>
freqPlot(
ostColour = ostBlue,
sorting = "none"
)
gdata::mv("p", "DnId") # p is sent to the global env. from the function
suppressWarnings(print(DnId))
```
##### table
```{r}
#| label: disability-count-table
#| tbl-cap: "Summary of responses to disability and/or neurodivergence"
#| output: asis
visMain |>
select(disability) |>
mutate(disability = forcats::fct_na_value_to_level(disability, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
---
##### descriptions
If participants chose ***yes*** as an answer above, they were given the opportunity to describe their disability(-ies) and/or neurodivergence, though doing so was optional. For those who did, the table below lists the descriptions they provided. The "NA" in the table refers to those who either did not see the question or chose not to supply a description.
The question was as follows:
>`r get_label(visMain$disabilityDesc)`
```{r}
#| label: disability-desc-table
#| tbl-cap: Descriptions of disability volunteered by participants
visMain |>
count(disabilityDesc) |>
arrange(desc(n)) |>
datatable(
class = 'cell-border stripe',
colnames = c(
"Feel free to describe your disabled and/or neurodivergent status (or not)",
"count"
),
options = list(
columnDefs = list(
list(
targets = 1,
render = JS(
"function(data, type, row, meta) {",
"return data === null ? 'NA' : data;",
"}"
)
)
)
)
)
```
---
#### felt affected
The sections directly below summarise, both visually and verbally, the answer to the following question:
>`r get_label(visMain$disabilityAffected)`
##### figure
```{r}
#| label: disability-affected-plot
#| fig-alt: "Frequency barplot of responses to the following statement: 'Do you feel that your disabled and/or neurodivergent status has affected your interactions with the PsychoPy community or software ecosystem?' If participants chose to respond, they could respond with either 'yes' or 'no.'"
visMain |>
select(disabilityAffected) |>
mutate(disabilityAffected = forcats::fct_na_value_to_level(disabilityAffected, level = "(missing)")) |>
freqPlot(
ostColour = ostOrange,
sorting = "none"
)
gdata::mv("p", "DnFa") # p is sent to the global env. from the function
suppressWarnings(print(DnFa))
```
##### table
```{r}
#| label: disability-felt-affected-count-table
#| tbl-cap: "Summary of responses to whether participants felt affected by their disability and/or neurodivergence"
#| output: asis
visMain |>
select(disabilityAffected) |>
mutate(disabilityAffected = forcats::fct_na_value_to_level(disabilityAffected, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
::: {.callout-important}
Important: The question directly above regarding disability and/or neurodivergence determined whether or not the participant saw the respective items directly below regarding *treatment (by others)*, *self-regard*, and *isolation*.
:::
---
#### treatment, self-regard, isolation
The following statements were seen only by the subset of participants noted above. Specifically, they were restricted to the **`r numbers_to_words(length(which(visMain$disabilityAffected=="Yes")))`** who replied ***yes*** to the question asking them whether they had felt that their disability and/or neurodivergence has affected their interactions with the *PsychoPy*<sup>®</sup> community. Of those, **`r numbers_to_words(length(which(!is.na(visMain$disabilityNegPerc))))`** provided responses, seen below.
The exact questions are listed in the verbal summary after the visualization.
##### figure
```{r}
#| label: disability-likert-plot
#| warning: false
#| fig-alt: "Stacked frequency barplots of responses to disability/neurodivergence, categorised into the following: treatment by others, self-regard, and isolation."
visMain |>
select(disabilityNegPerc:disabilityOthersLikeMe) |>
stackedLikertGroups(likertTitle = "Disability and/or neurodivergence")
gdata::mv("p", "DnLk") # p is sent to the global env. from the function
suppressWarnings(print(DnLk))
```
##### table
```{r}
#| label: disability-stats-table
#| tbl-cap: "Statistics for responses to statements regarding disability"
#| output: asis
visMain |>
select(disabilityNegPerc:disabilityOthersLikeMe) |>
likertTable(
lowerBound = "1 = Strongly disagree",
upperBound = "7 = Strongly agree",
byVar = NULL,
spanVar <- NULL
)
```
<!-- {{< include notes/_disability.md >}} -->
---
### written-English language dominance
The fifth EDI category is *written-English language dominance*. As before, we present the responses to the issue of identity, followed by a table of descriptions (supplied by some of the participants). This is followed by whether the participant felt affected in the *PsychoPy*<sup>®</sup> community by that identity. Finally, we summarise the participants responses to items listed under *treatment* (by others), *self-regard*, and *isolation*.
#### identity
##### figure
```{r}
#| label: dominant-language-plot
#| fig-alt: "Frequency barplot of responses to the following question: 'Is your dominant (preferred) written language English?' If participants chose to respond, they could respond with either 'yes' or 'no.'"
visMain |>
select(domLangEnglish) |>
mutate(domLangEnglish = forcats::fct_na_value_to_level(domLangEnglish, level = "(missing)")) |>
freqPlot(
ostColour = ostYellow,
sorting = "none"
)
gdata::mv("p", "DlWe") # p is sent to the global env. from the function
suppressWarnings(print(DlWe))
```
##### table
```{r}
#| label: domlang-count-table
#| tbl-cap: "Summary of responses to written-English language dominance"
#| output: asis
visMain |>
select(domLangEnglish) |>
mutate(domLangEnglish = forcats::fct_na_value_to_level(domLangEnglish, level = "(missing)")) |>
tbl_summary() |>
modify_header(label = "**Question**") |>
as_flex_table() |>
flextable::flextable_to_rmd()
```
---
##### descriptions
If participants chose ***no*** as an answer above, they were given the opportunity to describe their dominant language, though doing so was optional. For those who did, the table below lists the descriptions they provided. The "NA" in the table refers to those who either did not see the question or chose not to supply a description.
The question was as follows:
>`r get_label(visMain$domLangDesc)`
```{r}
#| label: domlang-desc-table
#| tbl-cap: Non-dominant languages volunteered by participants
visMain |>
count(domLangDesc) |>
arrange(desc(n)) |>