-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathopendatasurvey.Rmd
1492 lines (1094 loc) · 65.1 KB
/
opendatasurvey.Rmd
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: "Open data survey"
author: "Tomas Klingström"
date: "2024-10-23"
output:
html_document:
code_folding: hide
---
```{r setup_01, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# About this report
This report is designed with two purposes in mind.
If read directly without opening the code chunks the report provides a comparative analysis of the State of Open Data survey 2021 published by Digital Science (<https://doi.org/10.6084/m9.figshare.17081231>) and a community specific survey to survey the State of Open Data and attitudes towards FAIR data policies conducted by the Pigweb consortium. The Pigweb study is built on the template provided by the State of Open Data Survey to maximize the comparability between the pig research community participating in Pigweb and the much larger study conducted by Digital Science and Springer Nature. It does however also contain some specific questions regarding experiences with infrastructure and services supporting FAIR data.
Opening the code chunks provided in the document or downloading the github repository (<https://github.com/SGBC/survey>) enables researchers to copy the report and reuse it as a template for their own comparative studies. The document is divided into a number of code chunks with data pruning and functions at the top followed by the report with the code chunks generating data interspersed between them. The code in each chunk evaluating questions can be broken down into four parts:
1. Parsing the response tables from each questionnaire.
2. Recoding the responses from the two different surveys into the same format using functions in the file plotting_functions.R
3. Plotting response data with functions in the file plotting_functions.R.
4. Testing for statistic significance and other numeric analysis if applicable.
The code is release under a GNU General Public License v3.0 and is written to be as easily accessible as possible for students, researchers or other people who need to quickly parse and analyse a large study.
```{r prep_01, echo=F, eval = F, message=FALSE, warning=FALSE}
# install packages
install.packages("knitr")
install.packages("lattice")
install.packages("tidyverse")
install.packages("likert")
install.packages("MASS")
install.packages("psych")
install.packages("viridis")
install.packages("here")
install.packages("devtools")
#install.packages("rgr") An example of a package harming reproducibility
install.packages("readxl")
install.packages("ufs")
install.packages("writexl")
```
```{r prep_02, echo=F, eval = T, message=FALSE, warning=FALSE}
# set options
options(stringsAsFactors = F) # no automatic data transformation
options("scipen" = 100, "digits" = 4) # suppress math annotation
library(knitr)
library(lattice)
library(tidyverse)
library(likert)
library(MASS)
library(psych)
library(viridis)
library(ggplot2)
library(here)
library(devtools)
#library(rgr)
library(readxl)
library(writexl)
source("R/plotting_functions.R")
```
```{r pruning_01, echo=T, eval = T, message=FALSE, warning=FALSE}
sod21 <- read.csv2("sod21.csv")
pigw21 <- read.csv("pigw21.csv", sep=";") #Note: The original pigw21 file has been altered so that the column showing completion of survey is now last.
names(sod21) <- gsub(" ", "", names(sod21))
sod21collist <- data.frame(colnames(sod21)) #List of all columns with index
pig21collist <- data.frame(colnames(pigw21)) #List of all columns with index
#In the pigweb survey the last question was for respondents to provide their e-mail address and organisation for follow up questions. This is personal information which is not to be shared outside the limited timesframe of the project.
#pigw21 = pigw21[1:(length(pigw21)-6)]
#Apart from directly identifiable information it is important to ensure that combinations of information cannot be used to trace the respondents. In this case we have #therefore decided to separate the respondent data from the rest of the survey and scramble the rows. Thereby combinations such as year of first publication and major #source of finance cannot be used to identify respondents by a process of elimination. Note: This code was not used as a
#This snippet take the first 9 columns of the pigw21 dataset, put them in a separate dataframe and shuffles each column before putting it back together.
#pigrespondents = dplyr::select(pigw21, 1:9)
#pigw21 = dplyr::select(pigw21, !1:9)
#pigrespondents = as.data.frame(lapply(pigrespondents, sample))
#pigw21 = cbind(pigrespondents, pigw21)
#write_xlsx(pigw21, path = "pigw21s.xlsx")
#The shuffled file is the file shared in the supplementary data and loaded at the start of this chunk.
#A problem with the surveys is that we do not have a way of knowing if an answer is a 0 or empty due to conscious lack of response by the respondent or due to the respondent not finishing the survey.
#This sets the Data Frames to start at the first question. Each code chunk take the columns corresponding to a question and pass it to the pile when done.
sod21Pile = dplyr::select(sod21, 1:9)
pigw21Pile = dplyr::select(pigw21,1:3)
```
## Data in the survey
The questionnaire contain over 200 different answers per respondent and can be broken down into 6 different categories of questions, questions about the respondent, questions about the respondents research data, questions about the respondents usage of data and finally views on credit and recognition of data. There is also a final section on information about the respondents to the Pigweb survey which is not publicly shared as it would provide the means to identify the respondents of the survey. For visualizing the responses there are three types of questions which is each processed by a separate set of functions. The question types are:
1. Likert scale questions, usually with a five point scale going from "I strongly disagree" to "I strongly agree". These are reported using an empirical cumulative distribution function with one line each for the State of Open Data and the Pigweb survey. Hypothesis testing with calculation of p-values is done with a Kolmogorov-Smirnov test with the alternate hypothesis being that respondents are drawn from two populations with different preferences
2. Single choice questions, selecting between different options the respondent select the most fitting one. A frequency bar plot with the different alternatives is used to visualize these responses.
3. Multiple choice questions, respondents may select multiple answers to the question.A frequency bar plot with the different alternatives is used to visualize these responses with the frequency being the number of respondents who selected an answer divided by the number of respondents.
## About the respondents
The first three questions of the surveys were about the first year of publication, primary area of research interest and international collaboration.
```{r question_1, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 1"}
#Each chunk take a number of columns from the sod21 and pigw21 dataframes and put them in a separate dataframe for processing which is numbered sequentially.
#The sod21collist and pigw21collist dataframes provides index numbers for each dataframe to help selecting the right row.
sod21Q1 = as.data.frame(dplyr::select(sod21,10))
sod21Pile = cbind(sod21Pile, sod21Q1)
colnames(sod21Q1) = c('Q1')
pigw21Q1 = as.data.frame(dplyr::select(pigw21, 4))
pigw21Pile = cbind(pigw21Pile, pigw21Q1)
#Setting columnnames and storing the question
colnames(sod21Q1) = c('Q1')
colnames(pigw21Q1) = c('Q1')
Q1 = 'When was the last occasion that you published or submitted a manuscript to a journal?'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 1.
Q1_levels = c("Within the last year", "1-2 years ago",
"3-5 years ago", "More than 5 years ago",
"I have never submitted a manuscript to a journal")
Q1_data = format_question_likert(sod21Q1$Q1,
pigw21Q1$Q1,
Q1_levels)
```
```{r}
plot_likert(Q1_data,
Q1_levels,
Q1,
"Time since most recent publication")
ks.test(Q1_data$response[Q1_data$survey == "SoD"],
Q1_data$response[Q1_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q1
```
```{r question_2, echo=T, eval = T, message=FALSE, warning=FALSE, fig.cap="Figure 2"}
#Each chunk take a number of columns from the sod21 and pigw21 dataframes and put them in a separate dataframe for processing which is numbered sequentially.
#The sod21collist and pigw21collist dataframes provides index numbers for each dataframe to help selecting the right row.
sod21Q2 = as.data.frame(dplyr::select(sod21, 11))
sod21Pile = cbind(sod21Pile, sod21Q2) #Add it to the frame for questions already done.
pigw21Q2 = as.data.frame(dplyr::select(pigw21, 5))
pigw21Pile = cbind(pigw21Pile, pigw21Q2) #Add it to the frame for questions already done.
Q2 = 'In which year was your first peer-reviewed research article published?'
colnames(sod21Q2) = c('Q2')
colnames(pigw21Q2) = c('Q2')
Q2_data = format_question_numeric(sod21Q2$Q2,
pigw21Q2$Q2)
plot_numeric(Q2_data,
Q2,
"Year of first publication by respondent") +
coord_cartesian(xlim = c(1990, 2022))
Q2KS = ks.test(Q2_data$response[Q2_data$survey == "SoD"],
Q2_data$response[Q2_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q2
```
The proportion of respondents with over 20 years since their first publication is lower in the PigWeb survey than the State of Open Data survey but overall differences are not sufficient to reject the null hypothesis that the respondents belong to the same population(p = `r Q2KS$p.value`). As expected most PigWeb participants (N = 43) identify as Biologists (N = 28) with the remaining divided between medicine (N = 1) and "Other" where free text responses where related to veterinary sciences (N = 3), animal science (N = 6), life sciences (N = 1) or statistics and mathematics (N = 1).
```{r question_3, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 3"}
#This is a single choice question with an "other".
sod21Q3 = as.data.frame(dplyr::select(sod21, 12))
sod21Pile = cbind(sod21Pile, sod21Q3)
pigw21Q3 = as.data.frame(dplyr::select(pigw21, 6))
pigw21Pile = cbind(pigw21Pile, pigw21Q3)
Q3 = 'Which of the following best describes your primary area of interest?'
colnames(sod21Q3) = c('Q3')
colnames(pigw21Q3) = c('Q3')
## Fix the formatting of "Arts & Humanities"
sod21Q3$Q3 = sub(sod21Q3$Q3,
pattern = "Arts & Humanities|Arts & Humanities",
replacement = "Arts&Humanities")
Q3_levels = c("Astronomy and planetary science",
"Biology",
"Business/Investment",
"Chemistry",
"Earth and Environmental Science",
"Engineering",
"Materials Science",
"Medicine",
"Physics",
"Social Sciences",
"Arts&Humanities",
"Other")
Q3_data = format_question_single_choice(sod21Q3$Q3,
pigw21Q3$Q3,
Q3_levels)
plot_single_choice(Q3_data,
Q3_levels,
Q3,
"Area of interest")
## Others responses
unique(pigw21[,6])
sod21Q3other = as.data.frame(dplyr::select(sod21, 1))
sod21Pile = cbind(sod21Pile, sod21Q3other)
pigw21Q3other = as.data.frame(dplyr::select(pigw21, 1))
pigw21Pile = cbind(pigw21Pile, pigw21Q3other)
```
Researchers participating in the PigWeb survey are to a higher degree involved in collaborations than respondents in the State of Open Data survey which is consistent with survey participants being recruited from an EU project on building infrastructure for experimental research for sustainable pig production.
```{r question_4, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 4"}
#This code chunk uses the multiple choice functions.
Q4_levels = c("Yes, within my institution",
"Yes, within my country",
"Yes, internationally",
"No",
"I don't know")
n_columns = length(Q4_levels)
sod21Q4 = as.data.frame(dplyr::select(sod21, (14:sum(14,n_columns,-1))))
sod21Pile = cbind(sod21Pile, sod21Q4)
pigw21Q4 = as.data.frame(dplyr::select(pigw21, (9:sum(9,n_columns-1))))
pigw21Pile = cbind(pigw21Pile, pigw21Q4)
Q4 = 'Does any of your current research involve collaboration with others?'
Q4_data = format_question_multiple_choice(sod21Q4,
pigw21Q4,
Q4_levels)
plot_multiple_choice(Q4_data,
Q4_levels,
Q4,
"Response")
```
## Views on open access and open sharing of data or other results results.
```{r question_5-7, echo=T, eval = T, message=FALSE, warning=FALSE, fig.show="hold", out.width="50%", results=FALSE, fig.cap=c("Figure 5", "Figure 6", "Figure 5-7")}
#Question 5, 6 and 7 are similar and are therefore displayed together. Kolmogorov smirnov test output from the distributions are hidden in the automated output.
#Data to be analysed in the chunk is copied to the Q5 data frame and the pile before being removed from the data frame. The process is repeated for each question in it's respective chunk
#Note rerunning the below lines will move the currently first column in sod21 and pigw21, so running the code immediately below a second times means that the wrong question will be processed.
sod21Q5 = as.data.frame(dplyr::select(sod21,19))
sod21Pile = cbind(sod21Pile, sod21Q5)
colnames(sod21Q5) = c('Q5')
pigw21Q5 = as.data.frame(dplyr::select(pigw21, 14))
pigw21Pile = cbind(pigw21Pile, pigw21Q5)
#Setting columnnames and storing the question
colnames(sod21Q5) = c('Q5')
colnames(pigw21Q5) = c('Q5')
Q5 = 'Making research articles open access should be common scholarly practice'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 6.
Q5_levels = c("Strongly disagree", "Somewhat disagree",
"Neutral", "Somewhat agree",
"Strongly agree")
#The Pigweb scale puts strong agreement as 1 and strong disagreement as 5, this needs to be reversed for the question.
pigw21Q5$Q5 = reverseCode(pigw21Q5$Q5)
Q5_data = format_question_likert(sod21Q5$Q5,
pigw21Q5$Q5,
Q5_levels)
plot_likert(Q5_data,
Q5_levels,
Q5,
"Level of agreement")
#Data to be analysed in the chunk is copied to the Q6 data frame and the pile before being removed from the data frame. The process is repeated for each question in it's respective chunk
#Note rerunning the below lines will move the currently first column in sod21 and pigw21, so running the code immediately below a second times means that the wrong question will be processed.
sod21Q6 = as.data.frame(dplyr::select(sod21,20))
sod21Pile = cbind(sod21Pile, sod21Q6)
colnames(sod21Q6) = c('Q6')
pigw21Q6 = as.data.frame(dplyr::select(pigw21, 15))
pigw21Pile = cbind(pigw21Pile, pigw21Q6)
#Setting columnnames and storing the question
colnames(sod21Q6) = c('Q6')
colnames(pigw21Q6) = c('Q6')
Q6 = 'Making research data openly available should be common scholarly practice'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 7.
Q6_levels = c("Strongly disagree", "Somewhat disagree",
"Neutral", "Somewhat agree",
"Strongly agree")
#The Pigweb scale puts strong agreement as 1 and strong disagreement as 5, this needs to be reversed for the question.
pigw21Q6$Q6 = reverseCode(pigw21Q6$Q6)
Q6_data = format_question_likert(sod21Q6$Q6,
pigw21Q6$Q6,
Q6_levels)
plot_likert(Q6_data,
Q6_levels,
Q6,
"Level of agreement")
#Question 8
sod21Q7 = as.data.frame(dplyr::select(sod21,21))
sod21Pile = cbind(sod21Pile, sod21Q7)
colnames(sod21Q7) = c('Q7')
pigw21Q7 = as.data.frame(dplyr::select(pigw21, 16))
pigw21Pile = cbind(pigw21Pile, pigw21Q7)
#Setting columnnames and storing the question
colnames(sod21Q7) = c('Q7')
colnames(pigw21Q7) = c('Q7')
Q7 = 'Making all research outputs openly available should be common scholarly practice'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 8.
Q7_levels = c("Strongly disagree", "Somewhat disagree",
"Neutral", "Somewhat agree",
"Strongly agree")
#The Pigweb scale puts strong agreement as 1 and strong disagreement as 5, this needs to be reversed for the question.
pigw21Q7$Q7 = reverseCode(pigw21Q7$Q7)
Q7_data = format_question_likert(sod21Q7$Q7,
pigw21Q7$Q7,
Q7_levels)
plot_likert(Q7_data,
Q7_levels,
Q7,
"Level of agreement")
#This section test for if there is statistically significant difference in the respondent groups¨
#with the null hypothesis that the two populations are the same.
SvPQ5 = ks.test(Q5_data$response[Q5_data$survey == "SoD"],
Q5_data$response[Q5_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q5
SvPQ6 = ks.test(Q6_data$response[Q6_data$survey == "SoD"],
Q6_data$response[Q6_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q6
SvPQ7 = ks.test(Q7_data$response[Q7_data$survey == "SoD"],
Q7_data$response[Q7_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q7
PQ5vPQ7= ks.test(Q5_data$response[Q5_data$survey == "PigWeb"],
Q7_data$response[Q7_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q5 vs Q7
SQ5vSQ7= ks.test(Q5_data$response[Q5_data$survey == "SoD"],
Q7_data$response[Q7_data$survey == "SoD"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q5 vs Q7
```
Comparing the responses for each question there are no statistically significant differences between the populations(p = `r SvPQ5$p.value`, `r SvPQ6$p.value`, and `r SvPQ7$p.value` respectively). In both questionnaires respondents are however less likely to agree with the statement "Making all research outputs openly available should be common scholarly practice" than to the statement "Making research articles open access should be common scholarly practice" (p = `r SQ5vSQ7$p.value` the State of Open Data survey and `r PQ5vPQ7$p.value` for the PigWeb survey). The difference is markedly larger in the PigWeb survey as measured by the maximum geometric distance D between the two graphs (D = `r PQ5vPQ7$statistic` for Pigweb and D = `r SQ5vSQ7$statistic` for State of Open Data). We hypothesise that despite similar levels of support for open access publishing a higher proportion of the PigWeb participants are engaged in research together with commercial stakeholders which do not permit the open sharing of all data from studies made due to trade secrets and other immaterial property rights which will be followed up during a second phase of the PigWeb project with qualitative interviews. Researchers in PigWeb are also to a large degree of the existence of FAIR data as a concept but unfamiliar with applying it in practice.
```{r question_8, echo=T, eval = T, message=FALSE, warning=FALSE, fig.show="hold", out.width="50%", results=FALSE, fig.cap="Figure 8"}
#Data to be analysed in the chunk is copied to the Q8 data frame and the pile before being removed from the data frame. The process is repeated for each question in it's respective chunk
#Note rerunning the below lines will move the currently first column in sod21 and pigw21, so running the code immediately below a second times means that the wrong question will be processed.
sod21Q8 = as.data.frame(dplyr::select(sod21,22))
sod21Pile = cbind(sod21Pile, sod21Q8)
colnames(sod21Q8) = c('Q8')
pigw21Q8 = as.data.frame(dplyr::select(pigw21, 17))
pigw21Pile = cbind(pigw21Pile, pigw21Q8)
#Setting columnnames and storing the question
colnames(sod21Q8) = c('Q8')
colnames(pigw21Q8) = c('Q8')
Q8 = 'How familiar are you with the FAIR data principles in relation to open data?'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 9.
Q8_levels = c("I am familiar with the FAIR data principles", "I have previously heard of the FAIR data principles but I am not familiar with them", "I have never heard of the FAIR data principles before now")
#Reordering function for questions where this is necessary.
#pigw21Q8$Q8 = reverseCode(pigw21Q8$Q8)
Q8_data = format_question_likert(sod21Q8$Q8,
pigw21Q8$Q8,
Q8_levels)
plot_likert(Q8_data,
Q8_levels,
Q8,
"Level of agreement")
#This section test for if there is statistically significant difference in the respondent groups¨
#with the null hyptohesis that the two populations are the same.
SvPQ8 = ks.test(Q8_data$response[Q8_data$survey == "SoD"],
Q8_data$response[Q8_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q8
```
In comparison with the State of Open Data survey participants are more likely to be aware of FAIR data policies but lacking in familiarity with them (p = `r SvPQ8$p.value` and D = `r SvPQ8$p.statistic`).
## Implementation of FAIR data sharing in PigWeb
These questions are unique to the PigWeb survey and included as the European Commission policy is to promote and support FAIR data. In many cases FAIR data is also open data but in many sectors collaborations, immaterial rights and other requirements limit the ability to openly share all data and the PigWeb survey therefore include current work on FAIR data as supported by the EU commission and many national research organisations as well as the questions used in the State of Open Data survey.
```{r question_9, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 9", out.width="50%"}
#This is a single choice question without an "other" with responses only in the PigWeb survey.
pigw21Q9 = as.data.frame(dplyr::select(pigw21, 18))
pigw21Pile = cbind(pigw21Pile, pigw21Q9)
Q9 = 'Does your country have an open data policy relating to FAIR?'
colnames(pigw21Q9) = c('Q9')
Q9_levels = c("Yes", "No", "I don't know")
#The function is given a 0 instead of the column expected form the SoD survey as there is no question in it.
Q9_data = format_question_single_choice_pigweb(pigw21Q9$Q9,
Q9_levels)
plot_single_choice(Q9_data,
Q9_levels,
Q9,
"Area of interest")
```
```{r question_10, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 10", out.width="50%"}
#This is a single choice question without an "other" with responses only in the PigWeb survey.
pigw21Q10 = as.data.frame(dplyr::select(pigw21, 19))
pigw21Pile = cbind(pigw21Pile, pigw21Q10)
Q10 = 'Does your university/institute have an open data policy relating to FAIR?'
colnames(pigw21Q10) = c('Q10')
Q10_levels = c("Yes", "No", "I don't know")
#The function is given a 0 instead of the column expected form the SoD survey as there is no question in it.
Q10_data = format_question_single_choice_pigweb(pigw21Q10$Q10,
Q10_levels)
plot_single_choice(Q10_data,
Q10_levels,
Q10,
"Area of interest")
```
```{r question_11, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 11", out.width="50%"}
#This is a single choice question without an "other" with responses only in the PigWeb survey.
pigw21Q11 = as.data.frame(dplyr::select(pigw21, 20))
pigw21Pile = cbind(pigw21Pile, pigw21Q11)
Q11 = 'Do any of your main funders have an open data policy relating to FAIR?'
colnames(pigw21Q11) = c('Q11')
Q11_levels = c("Yes", "No", "I don't know")
#The function is given a 0 instead of the column expected form the SoD survey as there is no question in it.
Q11_data = format_question_single_choice_pigweb(pigw21Q11$Q11,
Q11_levels)
plot_single_choice(Q11_data,
Q11_levels,
Q11,
"Area of interest")
```
Researchers show the highest degree of uncertainty regarding FAIR policies on a national level (`r Q9_data[2,5]` %) but overall roughly a third of the respondents report that there is a FAIR data policy in place and they are aware of it. This is significantly lower than the percentage of researchers reporting that they are familiar with FAIR in the PigWeb survey (17 %, displayed in figure 8) but lower than the number of researchers reporting that they are aware of FAIR (71 %, displayed in figure 8). A small number of researchers also report that they confidently state that there is no FAIR policy in place at the university (14 %, N = 6) or enforced by their main funder (10 %, N = 4).
## Data curation and management
```{r question_12, echo=F, eval = T, message=FALSE, warning=FALSE, results=TRUE, fig.cap="Figure 12"}
#So this is a single choice question with an "other".
sod21Q12 = as.data.frame(dplyr::select(sod21, 23))
sod21Pile = cbind(sod21Pile, sod21Q12)
pigw21Q12 = as.data.frame(dplyr::select(pigw21, 21))
pigw21Pile = cbind(pigw21Pile, pigw21Q12)
Q12 = 'Do you curate/prepare your data for sharing during or shortly after the data collection process either privately or publicly?'
colnames(sod21Q12) = c('Q12')
colnames(pigw21Q12) = c('Q12')
#The State of Open Data survey contain som unfortunate formating as it seems to be made up of multiple different surveys stitched together and some questions have been rephrased.
#A reconciliation step is therefore necessary.
unique(sod21Q12)
sod21Q12[sod21Q12 == "Yes, all data"] = "Yes, all data collected"
sod21Q12[sod21Q12 == "Yes, some data"] = "Yes, some of the data collected"
sod21Q12[sod21Q12 == "No , other (please specify)"] = "No, other (please specify)"
sod21Q12[sod21Q12 == "No, other (please specify):"] = "No, other (please specify)"
sod21Q12[sod21Q12 == "No, we don't have the resource to do this but would like to"] = "No, we don't have the resource to do this but we would like to"
sod21Q12[sod21Q12 == "No, it's not important with our data"] = "No, its not important with our data"
unique(sod21Q12)
Q12_levels = c("Yes, all data collected",
"Yes, some of the data collected",
"Yes, but only data shared with colleagues or beyond",
"Yes, but only data shared publicly",
"No, its not important with our data",
"No, we don't have the resource to do this but we would like to",
"No, other (please specify)")
Q12_data = format_question_single_choice(sod21Q12$Q12,
pigw21Q12$Q12,
Q12_levels)
plot_single_choice(Q12_data,
Q12_levels,
Q12,
"Data curation practices by the respondent")
## Others responses
#unique(pigw21[,1])
#unique(sod21[,1])
sod21Q12other = as.data.frame(dplyr::select(sod21, 1))
sod21Pile = cbind(sod21Pile, sod21Q12other)
pigw21Q12other = as.data.frame(dplyr::select(pigw21, 22))
pigw21Pile = cbind(pigw21Pile, pigw21Q12other)
```
```{r question_13, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 13"}
#This code chunk uses the multiple choice functions.
Q13_levels = c("Yes, it was a requirement of my current funder",
"Yes, it was a requirement of my institution",
"Yes, it was a requirement of the journal I plan to submit to",
"Yes but not as a result of any requirement",
"No",
"I don't know")
n_columns = length(Q13_levels)
sod21Q13 = as.data.frame(dplyr::select(sod21, (25:sum(25,n_columns,-1))))
sod21Pile = cbind(sod21Pile, sod21Q13)
pigw21Q13 = as.data.frame(dplyr::select(pigw21, (23:sum(23,n_columns,-1))))
pigw21Pile = cbind(pigw21Pile, pigw21Q13)
Q13 = 'Have you created a data management plan for your current research?'
Q13_data = format_question_multiple_choice(sod21Q13,
pigw21Q13,
Q13_levels)
plot_multiple_choice(Q13_data,
Q13_levels,
Q13,
"Response")
```
Only a single researcher report sharing data to be FAIR and open but in total half the researchers report the data as being at least somewhat open and FAIR-compliant.
```{r question_14, echo=T, eval = T, message=FALSE, warning=FALSE, fig.show="hold", results=FALSE, fig.cap="Figure 14"}
#This question is only in the Pigweb study Data to be analysed in the chunk is copied to the Q14 data frame and the pile before being removed from the data frame. The process is repeated for each question in it's respective chunk
#Note rerunning the below lines will move the currently first column in pigw21, so running the code immediately below a second times means that the wrong question will be processed.
pigw21Q14 = as.data.frame(dplyr::select(pigw21, 29))
pigw21Pile = cbind(pigw21Pile, pigw21Q14)
#Setting columnnames and storing the question
colnames(pigw21Q14) = c('Q14')
Q14 = 'To what extent do you think you make your data open in compliance with FAIR?'
#unique(sod21Q2) #unique() is used to identify the unique answers of the question. It is commented out here to make the Notebook tidier.
#Setting the answer options to Question 9.
Q14_levels = c("Very much", "Somewhat", "Neutral", "Not very much", "Not at all", "I don't know")
#Reordering function for questions where this is necessary.
#pigw21Q14$Q14 = reverseCode(pigw21Q14$Q14)
Q14_data = format_question_likert_pigweb(pigw21Q14$Q14,
Q14_levels)
plot_likert(Q14_data,
Q14_levels,
Q14,
"Level of agreement")
```
```{r question_15, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 15"}
#This code chunk uses the multiple choice functions.
Q15_levels = c("Open data software provider",
"Colleague/Supervisor",
"Web-search",
"Institutional Library",
"Publisher",
"Funder",
"Research office/In-house institutional expertise",
"Professional 3rd party",
"Repository",
"I would not require help making my data openly available",
"Other (please specify)"
)
n_columns = length(Q15_levels)
pigw21Q15 = as.data.frame(dplyr::select(pigw21, (30:sum(30,n_columns,-1))))
pigw21Pile = cbind(pigw21Pile, pigw21Q15)
Q15 = 'If you required help in making your research data openly available, which sources would you rely on?'
Q15_data = format_question_multiple_choice_pigweb(pigw21Q15,
Q15_levels)
plot_multiple_choice(Q15_data,
Q15_levels,
Q15,
"Response")
```
#Question 16
```{r question_16, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 16"}
#Creating data sets for Q16 (In otherwords: Isolating the responses of Q16 in the two surveys and adding this to a compiled data set, one for each survey)
sod21Q16 = as.data.frame(dplyr::select(sod21,60))
sod21Pile = cbind(sod21Pile, sod21Q16)
colnames(sod21Q16) = c('Q16')
pigw21Q16 = as.data.frame(dplyr::select(pigw21, 42))
pigw21Pile = cbind(pigw21Pile, pigw21Q16)
#Setting columnnames and storing the question for Q16
colnames(sod21Q16) = c('Q16')
colnames(pigw21Q16) = c('Q16')
Q16 = 'Replicating studies (use of your data as a reference to determine whether they can be repeated under similar conditions)'
#Setting the answer options to Q16.
Q16_levels = c("Extremely comfortable", "Somewhat confortable",
"Neutral", "Somewhat uncomfortable",
"Extremely uncomfortable", "I don't know")
#The Pigweb scale is correctly formatted for this question (Q16), thus no need to reverse the question.
#pigw21Q16$Q16 = reverseCode(pigw21Q16$Q16)
Q16_data = format_question_likert(sod21Q16$Q16, #Making the answers to Q16 in the two questionnaires comparable, merging them to one data frame
pigw21Q16$Q16,
Q16_levels)
plot_likert(Q16_data, #Plotting the Level of agreement between the two surveys
Q16_levels,
Q16,
"Level of agreement")
#This section test for if there is statistically significant difference in the respondent groups¨
#with the null hyptohesis that the two populations are the same.
SvPQ16 = ks.test(Q16_data$response[Q16_data$survey == "SoD"],
Q16_data$response[Q16_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q16
```
# Question 17
```{r question_17, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 17"}
#Creating data sets for Q17
sod21Q17 = as.data.frame(dplyr::select(sod21,61))
sod21Pile = cbind(sod21Pile, sod21Q17)
colnames(sod21Q17) = c('Q17')
pigw21Q17 = as.data.frame(dplyr::select(pigw21, 43))
pigw21Pile = cbind(pigw21Pile, pigw21Q17)
#Setting columnnames and storing the question for Q17
colnames(sod21Q17) = c('Q17')
colnames(pigw21Q17) = c('Q17')
Q17 = 'Reanalysis (using a different method to analyse your data set)'
#Setting the answer options to Q17.
Q17_levels = c("Extremely comfortable", "Somewhat confortable",
"Neutral", "Somewhat uncomfortable",
"Extremely uncomfortable", "I don't know")
#The Pigweb scale is correctly formatted for this question (Q17), thus no need to reverse the question.
#pigw21Q16$Q16 = reverseCode(pigw21Q17$Q17)
Q17_data = format_question_likert(sod21Q17$Q17, #Making the answers to Q17 in the two questionnaires comparable, merging them to one data frame
pigw21Q17$Q17,
Q17_levels)
plot_likert(Q17_data, #Plotting the Level of agreement between the two surveys
Q17_levels,
Q17,
"Level of agreement")
#This section test for if there is statistically significant difference in the respondent groups¨
#with the null hyptohesis that the two populations are the same.
SvPQ17 = ks.test(Q17_data$response[Q17_data$survey == "SoD"],
Q17_data$response[Q17_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q17
```
# Question 18
```{r question_Q18, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure Q18"}
#Question 18
#To what extent are you comfortable with others using your data for the following
pigw21Q18 = as.data.frame(dplyr::select(pigw21, 44))
pigw21Pile = cbind(pigw21Pile, pigw21Q18)
#Setting column names and storing the question
colnames(pigw21Q18) = c('Q18')
Q18 = 'To what extent are you comfortable with others using your data for the following: Reinterpretation using your data as is to answer another question.'
#Setting the answer options to Question Q18.
Q18_levels = c("Extremely comfortable", "Somewhat", "Neutral", "Somewhat uncomfortable", "extremely uncomfortable", "I don't know")
sod21P1 = as.data.frame(dplyr::select(sod21,62))
sod21Pile = cbind(sod21Pile, sod21P1)
colnames(sod21P1) = c('Q18')
#The Pigweb scale puts strong agreement as 1 and strong disagreement as 5, this needs to be reversed for the question.
#pigw21Q18$Q18 = reverseCode(pigw21Q18$Q18)
Q18_data = format_question_likert(sod21P1$Q18,
pigw21Q18$Q18,
Q18_levels)
#Likert plot
plot_likert(Q18_data,
Q18_levels,
Q18,
"Level of comfort")
#This section test for if there is statistically significant difference in the respondent groups
#with the null hypothesis that the two populations are the same.
ks.test(Q18_data$response[Q18_data$survey == "SoD"],
Q18_data$response[Q18_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q18
#check number of NA's
sum(is.na(Q18_data$response))
```
# Question 19
```{r question_Q19, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure Q19"}
#Paulina question 2
#To what extent are you comfortable with others using your data for the following
pigw21Q19 = as.data.frame(dplyr::select(pigw21, 45))
pigw21Pile = cbind(pigw21Pile, pigw21Q19)
#Setting column names and storing the question
colnames(pigw21Q19) = c('Q19')
Q19 = 'To what extent are you comfortable with others using your data for the following: Isolated reuse (reanalysing your data to answer a new question).'
#Setting the answer options to Question Q19.
Q19_levels = c("Extremely comfortable", "Somewhat", "Neutral", "Somewhat uncomfortable", "extremely uncomfortable", "I don't know")
sod21Q19 = as.data.frame(dplyr::select(sod21,63))
sod21Pile = cbind(sod21Pile, sod21Q19)
colnames(sod21Q19) = c('Q19')
#The Pigweb scale puts strong agreement as 1 and strong disagreement as 5, this needs to be reversed for the question. This is not necessary here!
#pigw21Q19$Q19 = reverseCode(pigw21Q19$Q19)
Q19_data = format_question_likert(sod21Q19$Q19,
pigw21Q19$Q19,
Q19_levels)
#Likert plot
plot_likert(Q19_data,
Q19_levels,
Q19,
"Level of comfort")
#This section test for if there is statistically significant difference in the respondent groups
#with the null hypothesis that the two populations are the same.
ks.test(Q19_data$response[Q19_data$survey == "SoD"],
Q19_data$response[Q19_data$survey == "PigWeb"],
ifresult = FALSE) #Kolmogorov-Smirnov test for Q19
```
# Question 20
To what extent are you comfortable with others using your data for the following:
```{r question_20, echo=T, eval = T, message=FALSE, warning=FALSE, fig.show="hold", out.width="50%", results=FALSE, fig.cap=c("Figure 20")}
# This is a single choice question measure on a likert scale
# - This code chunk uses likert functions
# Create data frames of answers from both surveys
# - i.e. extracting the column of the respective data frame that contains the answers
sod21Q20 <- as.data.frame(sod21[,64])
pigw21Q20 <- as.data.frame(pigw21[,46])
# Add the questions to the 'pile' with all the other questions
pigw21Pile <- cbind(pigw21Pile, pigw21Q20)
sod21Pile <- cbind(sod21Pile, sod21Q20)
#Setting column names
colnames(sod21Q20) = c('Q20')
colnames(pigw21Q20) = c('Q20')
# Storing the question (used for plotting)
# - The plot title
Q20 = 'Combination reuse (reanalyzing your data in combination with other data sets to answer a new question)'
# Setting the answer options to Question 20
# - i.e. the ticks on the x axis when plotting
Q20_levels = c("Extremely comfortable", "Somewhat comfortable",
"Neutral", "Somewhat uncomfortable",
"Extremely uncomfortable", "I don't know")
# The code below is used when it is necessary to reverse the question scale. This is not necessary here!
# pigw21Q20$Q20 = reverseCode(pigw21Q20$Q20)
# Create a data frame for plotting that combines SoD and PigWeb data for likert scale question
# - sod_data and pigweb_data are vectors of answers
# - levels is a vector of the levels in order from low to high
# NB! sod_data must be before pigweb_data
Q20_data <- format_question_likert(sod21Q20$Q20,
pigw21Q20$Q20,
Q20_levels)
# Plot a cumulative step graph of the answers for a Likert-scale question
# Arguments (in order):
# - A data frame produced by format_question_likert
# - A vector of levels in order from low to high
# - A character string of the question which will be the title
# - A character string for the x-axis label (not a separate vector, write text below)
plot_likert(Q20_data,
Q20_levels,
Q20,
"Level of comfort")
```
# Question 21
```{r question_21, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 21"}
#This code chunk uses the multiple choice functions.
#Response levels of Q21
Q21_levels = c("Contains sensitive information or require study participant permissions before sharing",
"Lack of time to deposit data",
"Costs of sharing data",
"Unsure about copyright and data licensing",
"Data are too large to share",
"I do not know what repository to use",
"I am unsure I have permission from my funder or institute to share my data",
"Data are too small or unimportant",
"Organising data in a presentable and usable way",
"Concerns about misuse of data",
"Not receiving appropriate credit or acknowledgement",
"Another lab may make a different interpretation of my data",
"Another lab may 'scoop' me to a discovery",
"I'm not sure I've exhausted all potential findings yet",
"Others may find errors in my data",
"Others may not be able to repeat my findings",
"I have no desire to share my findings",
"I have no problems/concerns about sharing data",
"Other")
n_columns = length(Q21_levels) #Calculating number of columns with answers to question 21 (One for each level of Q21 above)
sod21Q21 = as.data.frame(dplyr::select(sod21, (65:sum(65,n_columns,-1)))) #Summarizing the responses for all levels of Q21, except the "Other" category into one new data set
sod21Pile = cbind(sod21Pile, sod21Q21) #Adding these to the Pile
pigw21Q21 = as.data.frame(dplyr::select(pigw21, (47:sum(47,n_columns,-1)))) #Summarizing the responses for all levels of Q21, except the "Other" category into one new data set
pigw21Pile = cbind(pigw21Pile, pigw21Q21) #Adding these to the Pile
Q21 = "What problems/concerns, if any, do you have with sharing datasets?" #Question 21 and title of Figure 21
Q21_data = format_question_multiple_choice(sod21Q21, #Making the answers to Q21 in the two questionnaires comparable, merging them to one data frame
pigw21Q21,
Q21_levels)
plot_multiple_choice(Q21_data, #Plotting the responses without the "Other" option
Q21_levels,
Q21,
"Response")
## Others responses for Q21
#unique(pigw21[,65]) #Changed to comment to avoid long list with all of the different answers
#unique(sod21[,84]) #Changed to comment to avoid long list with all of the different answers
sod21Q21other = as.data.frame(dplyr::select(sod21, 1))
sod21Pile = cbind(sod21Pile, sod21Q21other)
pigw21Q21other = as.data.frame(dplyr::select(pigw21, 1))
pigw21Pile = cbind(pigw21Pile, pigw21Q21other)
```
```{r question_Q22, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure Q22"}
#What areas (if any) do you feel you need help with in regard to making your research data openly available.
#This code chunk uses the multiple choice functions.
Q22_levels = c("Finding the time to manage my data",
"Data management plans",
"Copyright/Licensing of data",
"Data management policies",
"Curation of data",
"Finding appropiate repositories for deposition of data",
"None of the abobe",
"Other")
n_columns = length(Q22_levels)
sod21Q22 = as.data.frame(dplyr::select(sod21, (87:sum(87,n_columns,-1))))
sod21Pile = cbind(sod21Pile, sod21Q22)
pigw21Q22 = as.data.frame(dplyr::select(pigw21, (67:sum(67,n_columns-1))))
pigw21Pile = cbind(pigw21Pile, pigw21Q22)
Q22 = 'What areas (if any) do you feel you need help with in regard to making your research data openly available'
Q22_data = format_question_multiple_choice(sod21Q22,
pigw21Q22,
Q22_levels)
plot_multiple_choice(Q22_data,
Q22_levels,
Q22,
"Response")
```
# Question 27
How do you share your research data with a public audience. Please select all that apply \* Institutional repository \* Funder repository \* External repository \* Blog/Website \* Cloud file sharing \* Other (please specify)
```{r question_27, echo=T, eval = T, message=FALSE, warning=FALSE, results=FALSE, fig.cap="Figure 27", out.width="50%"}
# This is a multiple choice question with an 'other' option
# - This code chunk uses multiple choice functions
# Setting the answer options to Question 27
# - i.e. the ticks on the x axis when plotting
Q27_levels = c("Institutional repository",
"Funder repository",
"External repository",
"Blog/Website",
"Cloud file sharing",
"Other")
# Create vector of the number of levels
# - Needed to extract columns corresponding to the questions in next step
n_columns <- length(Q27_levels)
# Create data frames of answers from both surveys
# - i.e. extracting the the multiple columns of the respective data frame that contains the answers