Skip to content

Commit 72cf575

Browse files
committed
initial commit
0 parents  commit 72cf575

5 files changed

+409
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
6+
_targets/
7+
data/raw/results-survey.csv

README.md

+248
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
# Value dissonance in research(er) assessment: Individual and institutional priorities in review, promotion and tenure criteria related to research quality, quantity, openness and responsibility
2+
3+
This repository holds code and data for the preprint "Value dissonance in research(er) assessment: Individual and institutional priorities in review, promotion and tenure criteria related to research quality, quantity, openness and responsibility".
4+
5+
Not all raw data is shared, to avoid re-identification of participants. We
6+
provide a cleaned version of the data with qualitative answers and country
7+
information removed.
8+
9+
10+
## Reproducible code
11+
The analytic pipeline for generating tables and figures is reproducible through the
12+
`targets` package. Running `tar_make()` will rebuild all notebooks. The initial
13+
pipeline for data pre-processing involved multiple steps, however, they are not
14+
available for reproduction because we cannot openly share the original raw data.
15+
16+
The pipeline is specified in the file `_targets.R`. You can visualise the
17+
dependencies with the following code:
18+
19+
```r
20+
targets::tar_visnetwork()
21+
```
22+
23+
24+
All packages that are used during the analysis are specified in `R/packages.R`.
25+
For the analysis files to render you will need to install the font "Hind" (for
26+
example from [Google Fonts](https://fonts.google.com/)) and
27+
register it with
28+
[`extrafont`](https://cran.r-project.org/web/packages/extrafont/README.html).
29+
See the file `load_fonts.R` for specific instructions.
30+
31+
32+
### Code files
33+
34+
The code to reproduce all values and figures can be found in five RMarkdown
35+
documents, located in the folder `analysis-notebooks`:
36+
37+
- 01-demography.Rmd
38+
- 02-institutional-context.Rmd
39+
- 03-attitudes-towards-promotion-criteria.Rmd
40+
- 04-opinion-vs-practice.Rmd
41+
- 05-research-vs-policies.Rmd
42+
43+
Rendered versions are available as `.md`-files (which are displayed on GitHub)
44+
or `.html` files which can be viewed locally.
45+
46+
Note that this repository does not contain data necessary to reproduce
47+
`01-demography.Rmd`. To protect the identities of our participants, this data
48+
was removed from the public files.
49+
50+
Further core files for the analysis pipeline's reproducibility are the following:
51+
52+
|File name |Purpose |
53+
|:-------------------------------|:--------------------------------------------------------------------------|
54+
|_targets.R |Core file for building the analysis. Run with `targets::tar_make()`.|
55+
|R/packages.R |Lists all packages relevant to the analysis. |
56+
|R/functions.R |Functions that wrap preprocessing tasks as outlined in `_targets.R`.|
57+
|R/helpers.R |Some helper functions that are re-used throughout the analysis.|
58+
59+
## Data description
60+
Procedures for collecting the data are outlined in the preprint.
61+
62+
### Overview of data files
63+
64+
|File name |Purpose |
65+
|:-------------------------------|:---------------------------------------------------------------------|
66+
|data/external/world_bank_country_classification.xlsx |Categorisations of countries into world regions. Obtained from the [World Bank](https://datahelpdesk.worldbank.org/knowledgebase/articles/906519-world-bank-country-and-lending-groups), and made available under CC-BY.|
67+
|data/processed/shareable_data.csv|This is the main data file that underlies the analysis. A description of variables is provided in the next file.|
68+
|data/processed/var_overview.csv |Provides full column names as key-value pairs for the abbreviated column names from the main data file.|
69+
|data/processed/labels_expanded.csv |Small file used to generate lables for some of the figures.|
70+
|data/processed/disciplines_lookup.xlsx |Manual mapping of respondents' disciplines to disciplines from Web of Science.|
71+
72+
73+
## Further resources
74+
You can find more information on the `targets` package here:
75+
https://books.ropensci.org/targets/
76+
77+
78+
79+
## Package versions used
80+
The analysis was last rendered with the following package versions:
81+
82+
```r
83+
sessioninfo::session_info()
84+
Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
85+
setting value
86+
version R version 4.2.2 (2022-10-31 ucrt)
87+
os Windows 10 x64 (build 19045)
88+
system x86_64, mingw32
89+
ui RStudio
90+
language (EN)
91+
collate German_Austria.utf8
92+
ctype German_Austria.utf8
93+
tz Europe/Berlin
94+
date 2022-12-20
95+
rstudio 2022.12.0+353 Elsbeth Geranium (desktop)
96+
pandoc 2.19.2 @ C:/Users/tklebel/AppData/Local/Programs/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
97+
98+
Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
99+
package * version date (UTC) lib source
100+
ash 1.0-15 2015-09-01 [1] CRAN (R 4.2.0)
101+
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.1)
102+
backports 1.4.1 2021-12-13 [1] CRAN (R 4.2.0)
103+
base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.2.0)
104+
base64url 1.4 2018-05-14 [1] CRAN (R 4.2.1)
105+
boot 1.3-28 2021-05-03 [2] CRAN (R 4.2.2)
106+
broom 1.0.1 2022-08-29 [1] CRAN (R 4.2.1)
107+
ca * 0.71.1 2020-01-24 [1] CRAN (R 4.2.2)
108+
cachem 1.0.6 2021-08-19 [1] CRAN (R 4.2.1)
109+
callr 3.7.3 2022-11-02 [1] CRAN (R 4.2.2)
110+
cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.2.1)
111+
checkmate 2.1.0 2022-04-21 [1] CRAN (R 4.2.1)
112+
class 7.3-20 2022-01-16 [2] CRAN (R 4.2.2)
113+
cli 3.4.0 2022-09-08 [1] CRAN (R 4.2.1)
114+
clisymbols 1.2.0 2017-05-21 [1] CRAN (R 4.2.2)
115+
cluster 2.1.4 2022-08-22 [2] CRAN (R 4.2.2)
116+
codetools 0.2-18 2020-11-04 [2] CRAN (R 4.2.2)
117+
colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.1)
118+
corrplot * 0.92 2021-11-18 [1] CRAN (R 4.2.2)
119+
crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.2)
120+
data.table 1.14.4 2022-10-17 [1] CRAN (R 4.2.2)
121+
DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.1)
122+
dbplyr 2.2.1 2022-06-27 [1] CRAN (R 4.2.1)
123+
deldir 1.0-6 2021-10-23 [1] CRAN (R 4.2.1)
124+
DescTools * 0.99.47 2022-10-22 [1] CRAN (R 4.2.2)
125+
devtools 2.4.5 2022-10-11 [1] CRAN (R 4.2.1)
126+
digest 0.6.30 2022-10-18 [1] CRAN (R 4.2.2)
127+
dplyr * 1.0.10 2022-09-01 [1] CRAN (R 4.2.1)
128+
e1071 1.7-12 2022-10-24 [1] CRAN (R 4.2.2)
129+
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.2.1)
130+
evaluate 0.18 2022-11-07 [1] CRAN (R 4.2.2)
131+
Exact 3.2 2022-09-25 [1] CRAN (R 4.2.1)
132+
expm 0.999-6 2021-01-13 [1] CRAN (R 4.2.2)
133+
extrafont * 0.18 2022-04-12 [1] CRAN (R 4.2.0)
134+
extrafontdb 1.0 2012-06-11 [1] CRAN (R 4.2.0)
135+
fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.1)
136+
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.1)
137+
forcats * 0.5.2 2022-08-19 [1] CRAN (R 4.2.1)
138+
foreign 0.8-83 2022-09-28 [2] CRAN (R 4.2.2)
139+
Formula 1.2-4 2020-10-16 [1] CRAN (R 4.2.0)
140+
fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.1)
141+
gargle 1.2.1 2022-09-08 [1] CRAN (R 4.2.1)
142+
gdtools 0.2.4 2022-02-14 [1] CRAN (R 4.2.1)
143+
generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.1)
144+
ggalt * 0.4.0 2017-02-15 [1] CRAN (R 4.2.2)
145+
ggchicklet * 0.5.0 2022-12-13 [1] local
146+
ggplot2 * 3.4.0 2022-11-04 [1] CRAN (R 4.2.2)
147+
ggrepel 0.9.2 2022-11-06 [1] CRAN (R 4.2.2)
148+
gld 2.6.6 2022-10-23 [1] CRAN (R 4.2.2)
149+
glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.1)
150+
googledrive 2.0.0 2021-07-08 [1] CRAN (R 4.2.1)
151+
googlesheets4 1.0.1 2022-08-13 [1] CRAN (R 4.2.1)
152+
gridExtra 2.3 2017-09-09 [1] CRAN (R 4.2.1)
153+
gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.1)
154+
haven 2.5.1 2022-08-22 [1] CRAN (R 4.2.1)
155+
Hmisc 4.7-2 2022-11-18 [1] CRAN (R 4.2.2)
156+
hms 1.1.2 2022-08-19 [1] CRAN (R 4.2.1)
157+
hrbrthemes * 0.8.0 2020-03-06 [1] CRAN (R 4.2.1)
158+
htmlTable 2.4.1 2022-07-07 [1] CRAN (R 4.2.2)
159+
htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.2.1)
160+
htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.2.1)
161+
httpuv 1.6.6 2022-09-08 [1] CRAN (R 4.2.1)
162+
httr 1.4.4 2022-08-17 [1] CRAN (R 4.2.1)
163+
igraph 1.3.5 2022-09-22 [1] CRAN (R 4.2.2)
164+
interp 1.1-3 2022-07-13 [1] CRAN (R 4.2.2)
165+
janitor * 2.1.0 2021-01-05 [1] CRAN (R 4.2.2)
166+
jpeg 0.1-10 2022-11-29 [1] CRAN (R 4.2.2)
167+
jsonlite 1.8.3 2022-10-21 [1] CRAN (R 4.2.2)
168+
KernSmooth 2.23-20 2021-05-03 [2] CRAN (R 4.2.2)
169+
knitr 1.40 2022-08-24 [1] CRAN (R 4.2.1)
170+
later 1.3.0 2021-08-18 [1] CRAN (R 4.2.1)
171+
lattice 0.20-45 2021-09-22 [2] CRAN (R 4.2.2)
172+
latticeExtra 0.6-30 2022-07-04 [1] CRAN (R 4.2.2)
173+
lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.2)
174+
lmom 2.9 2022-05-29 [1] CRAN (R 4.2.0)
175+
lubridate 1.9.0 2022-11-06 [1] CRAN (R 4.2.2)
176+
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.1)
177+
maps 3.4.1 2022-10-30 [1] CRAN (R 4.2.2)
178+
MASS 7.3-58.1 2022-08-03 [2] CRAN (R 4.2.2)
179+
Matrix 1.5-3 2022-11-11 [1] CRAN (R 4.2.2)
180+
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.1)
181+
mime 0.12 2021-09-28 [1] CRAN (R 4.2.0)
182+
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.2.1)
183+
modelr 0.1.10 2022-11-11 [1] CRAN (R 4.2.2)
184+
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.1)
185+
mvtnorm 1.1-3 2021-10-08 [1] CRAN (R 4.2.0)
186+
nnet 7.3-18 2022-09-28 [2] CRAN (R 4.2.2)
187+
patchwork * 1.1.2 2022-08-19 [1] CRAN (R 4.2.1)
188+
pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.1)
189+
pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.2.1)
190+
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.1)
191+
pkgload 1.3.1 2022-10-28 [1] CRAN (R 4.2.1)
192+
png 0.1-8 2022-11-29 [1] CRAN (R 4.2.2)
193+
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.2.1)
194+
processx 3.8.0 2022-10-26 [1] CRAN (R 4.2.2)
195+
profvis 0.3.7 2020-11-02 [1] CRAN (R 4.2.1)
196+
proj4 1.0-12 2022-11-30 [1] CRAN (R 4.2.2)
197+
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.2.1)
198+
prompt 1.0.1 2021-03-12 [1] CRAN (R 4.2.1)
199+
proxy 0.4-27 2022-06-09 [1] CRAN (R 4.2.2)
200+
ps 1.7.2 2022-10-26 [1] CRAN (R 4.2.2)
201+
purrr * 0.3.5 2022-10-06 [1] CRAN (R 4.2.2)
202+
R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.1)
203+
RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.2.0)
204+
Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.2.1)
205+
readr * 2.1.3 2022-10-01 [1] CRAN (R 4.2.2)
206+
readxl 1.4.1 2022-08-17 [1] CRAN (R 4.2.1)
207+
remotes 2.4.2 2021-11-30 [1] CRAN (R 4.2.1)
208+
reprex 2.0.2 2022-08-17 [1] CRAN (R 4.2.1)
209+
rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.2)
210+
rmarkdown 2.18 2022-11-09 [1] CRAN (R 4.2.2)
211+
rootSolve 1.8.2.3 2021-09-29 [1] CRAN (R 4.2.0)
212+
rpart 4.1.19 2022-10-21 [2] CRAN (R 4.2.2)
213+
rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.1)
214+
Rttf2pt1 1.3.11 2022-10-08 [1] CRAN (R 4.2.1)
215+
rvest 1.0.3 2022-08-19 [1] CRAN (R 4.2.1)
216+
scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.1)
217+
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.1)
218+
shiny 1.7.3 2022-10-25 [1] CRAN (R 4.2.2)
219+
snakecase 0.11.0 2019-05-25 [1] CRAN (R 4.2.2)
220+
stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.1)
221+
stringr * 1.4.1 2022-08-20 [1] CRAN (R 4.2.1)
222+
survival 3.4-0 2022-08-09 [2] CRAN (R 4.2.2)
223+
systemfonts 1.0.4 2022-02-11 [1] CRAN (R 4.2.1)
224+
tarchetypes * 0.7.2 2022-10-31 [1] CRAN (R 4.2.2)
225+
targets * 0.14.0 2022-11-01 [1] CRAN (R 4.2.2)
226+
tibble * 3.1.8 2022-07-22 [1] CRAN (R 4.2.1)
227+
tidylog * 1.0.2 2020-07-03 [1] CRAN (R 4.2.2)
228+
tidyr * 1.2.1 2022-09-08 [1] CRAN (R 4.2.1)
229+
tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.2)
230+
tidyverse * 1.3.2 2022-07-18 [1] CRAN (R 4.2.1)
231+
timechange 0.1.1 2022-11-04 [1] CRAN (R 4.2.2)
232+
tzdb 0.3.0 2022-03-28 [1] CRAN (R 4.2.1)
233+
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.2.1)
234+
usethis 2.1.6 2022-05-25 [1] CRAN (R 4.2.1)
235+
utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.1)
236+
vctrs 0.5.0 2022-10-22 [1] CRAN (R 4.2.2)
237+
withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.1)
238+
xfun 0.34 2022-10-18 [1] CRAN (R 4.2.2)
239+
xml2 1.3.3 2021-11-30 [1] CRAN (R 4.2.1)
240+
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.2.1)
241+
yaml 2.3.6 2022-10-18 [1] CRAN (R 4.2.1)
242+
243+
[1] C:/Users/tklebel/AppData/Local/R/win-library/4.2
244+
[2] C:/Program Files/R/R-4.2.2/library
245+
246+
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
247+
```
248+

RPT-survey-analysis.Rproj

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX
14+
15+
AutoAppendNewline: Yes
16+
StripTrailingWhitespace: Yes

_targets.R

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
library(targets)
2+
library(tarchetypes)
3+
4+
source("R/functions.R")
5+
source("R/helpers.R")
6+
7+
options(tidyverse.quiet = TRUE)
8+
9+
# ggchicklet is not available from CRAN
10+
# install.packages("ggchicklet", repos = "https://cinc.rud.is")
11+
12+
tar_option_set(packages = c("scales", "tidyverse", "ggchicklet", "hrbrthemes",
13+
"janitor"))
14+
15+
owner <- FALSE # set this to FALSE if you are not Thomas Klebel
16+
17+
if (owner) {
18+
# full pipeline for original data
19+
list(
20+
tar_target(
21+
raw_data_file,
22+
"data/raw/results-survey.csv",
23+
format = "file"
24+
),
25+
tar_target(
26+
recoded_disciplines_file,
27+
"data/processed/disciplines_lookup.xlsx",
28+
format = "file"
29+
),
30+
tar_target(
31+
wb_file,
32+
"data/external/world_bank_country_classification.xlsx",
33+
format = "file"
34+
),
35+
tar_target(
36+
label_file,
37+
"data/processed/labels_expanded.csv",
38+
format = "file"
39+
),
40+
tar_target(
41+
var_overview,
42+
create_var_overview(raw_data_file)
43+
),
44+
tar_target(
45+
raw_data,
46+
read_csv(raw_data_file, col_names = FALSE, skip = 1)
47+
),
48+
tar_target(
49+
expanded_labels,
50+
read_csv(label_file, col_types = "cc")
51+
),
52+
tar_target(
53+
recoded_disciplines,
54+
readxl::read_excel(recoded_disciplines_file, na = "NA")
55+
),
56+
tar_target(
57+
wb_countries,
58+
read_clean_wb_countries(wb_file)
59+
),
60+
tar_target(
61+
clean_data,
62+
clean_raw_data(raw_data, wb_countries) %>%
63+
merge_disciplines(recoded_disciplines)
64+
),
65+
tar_target(
66+
shareable_data,
67+
clean_data %>%
68+
select(-X12, -X16, -X89) # remove country and institution information
69+
),
70+
tar_target(
71+
share_data,
72+
write_csv(shareable_data, "data/processed/shareable_data.csv")
73+
),
74+
tar_render(demographics, "analysis-notebooks/01-demography.Rmd"),
75+
tar_render(institutional_context, "analysis-notebooks/02-institutional-context.Rmd"),
76+
tar_render(attitudes, "analysis-notebooks/03-attitudes-towards-promotion-criteria.Rmd"),
77+
tar_render(opinion_vs_practice, "analysis-notebooks/04-opinion-vs-practice.Rmd"),
78+
tar_render(research_vs_policy, "analysis-notebooks/05-research-vs-policies.Rmd"))
79+
} else {
80+
# abbreviated target pipeline for publicly shared data
81+
list(
82+
tar_target(
83+
survey_file,
84+
"data/processed/shareable_data.csv",
85+
format = "file"
86+
),
87+
tar_target(
88+
shareable_data,
89+
read_csv(survey_file)
90+
),
91+
tar_target(
92+
var_overview_file,
93+
"data/processed/var_overview.csv",
94+
format = "file"
95+
),
96+
tar_target(
97+
var_overview,
98+
read_csv(var_overview_file, col_types = "cc")
99+
),
100+
tar_target(
101+
label_file,
102+
"data/processed/labels_expanded.csv",
103+
format = "file"
104+
),
105+
tar_target(
106+
expanded_labels,
107+
read_csv(label_file, col_types = "cc")
108+
),
109+
tar_render(institutional_context, "analysis-notebooks/02-institutional-context.Rmd"),
110+
tar_render(attitudes, "analysis-notebooks/03-attitudes-towards-promotion-criteria.Rmd"),
111+
tar_render(opinion_vs_practice, "analysis-notebooks/04-opinion-vs-practice.Rmd"),
112+
tar_render(research_vs_policy, "analysis-notebooks/05-research-vs-policies.Rmd")
113+
)
114+
}
115+
116+

0 commit comments

Comments
 (0)