-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsentiments.qmd
171 lines (150 loc) · 4.6 KB
/
sentiments.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
---
title: "Perceptions"
---
<!-- Setup -->
```{r}
source('setup.R')
```
### Value of Open Source Projects
When asked to characterize the importance of open source tools to their education, teaching, and research, respondents said the following:
```{r}
s1_df <- survey_results |>
mutate(QID4 = ifelse(is.na(QID4), 'Unafilliated', QID4),
QID16 = factor(QID16,
levels = c(
'Critical/Vital/Essential',
'Valuable',
'Neutral',
'Little importance',
'Irrelevant'
))) |>
rename(`Respondent Type` = QID4) |>
group_by(QID16, `Respondent Type`) |>
summarise(Count = n(),
Percent = Count / nrow(survey_results))
s1_df |>
plot_ly(
x = ~ QID16,
y = ~ Percent,
color = ~ `Respondent Type`,
colors = viridis_pal(option = "D")(length(s1_df$`Respondent Type`))
) |>
add_bars() |>
layout(
barmode = 'stack',
plot_bgcolor = background_color,
paper_bgcolor = background_color,
xaxis = list(title = ''),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff',
tickformat = ".1%"
)
)
```
Survey takers were also asked how much they agree that 1) open source tools are a valuable form of research output and 2) open source tools are an important way to translate research into entrepreneurship and innovation.
```{r}
s2_df <- survey_results |>
mutate(QID4 = ifelse(is.na(QID4), 'Unafilliated', QID4),
QID20 = factor(QID20, levels = c(
'Strongly agree',
'Somewhat agree',
'Neither agree nor disagree',
'Somewhat disagree',
'Strongly disagree'
))) |>
rename(`Respondent Type` = QID4) |>
group_by(QID20, `Respondent Type`) |>
summarise(Count = n(),
Percent = Count / nrow(survey_results))
s3_df <- survey_results |>
mutate(QID4 = ifelse(is.na(QID4), 'Unafilliated', QID4),
QID21 = factor(QID21, levels = c(
'Strongly agree',
'Somewhat agree',
'Neither agree nor disagree',
'Somewhat disagree',
'Strongly disagree'
))) |>
rename(`Respondent Type` = QID4) |>
group_by(QID21, `Respondent Type`) |>
summarise(Count = n(),
Percent = Count / nrow(survey_results))
```
::: {.panel-tabset}
### "OS is a valuable research output"
```{r}
s2_df |>
plot_ly(
x = ~ reorder(QID20, desc(Percent)),
y = ~ Percent,
color = ~ `Respondent Type`,
colors = viridis_pal(option = "D")(length(s2_df$`Respondent Type`))
) |>
add_bars() |>
layout(
barmode = 'stack',
plot_bgcolor = background_color,
paper_bgcolor = background_color,
xaxis = list(title = ''),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff',
tickformat = ".1%"
)
)
```
### "OS translates research into innovation"
```{r}
s3_df |>
plot_ly(
x = ~ reorder(QID21, desc(Percent)),
y = ~ Percent,
color = ~ `Respondent Type`,
colors = viridis_pal(option = "D")(length(s3_df$`Respondent Type`))
) |>
add_bars() |>
layout(
barmode = 'stack',
plot_bgcolor = background_color,
paper_bgcolor = background_color,
xaxis = list(title = ''),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff',
tickformat = ".1%"
)
)
```
:::
### Benefits of Open Source Tools in Academic Settings
We asked survey respondents to choose among a list of potential benefits of using open-source tools in their work. Of the survey-takers who identified benefits, the percentage of respondents who identified each benefit are shown below:
```{r}
s4 <- survey_results |>
select(ResponseId, QID18) |>
separate_rows(QID18, sep = ',') |>
group_by(Benefit = QID18) |>
summarise(count = n(),
pct = count/nrow(survey_results)) |>
mutate(Benefit = ifelse(is.na(Benefit), 'None', Benefit)) |>
arrange(desc(pct)) |>
ggplot() +
geom_segment(
aes(x = reorder(Benefit, pct), xend = reorder(Benefit, pct), y = 0, yend = pct), color = primary_color
) +
geom_point(
aes(x = Benefit, y = pct, text = paste0(round(pct * 100, 2), '%')),
color = primary_color
) +
theme_minimal() +
scale_color_identity() +
scale_y_continuous(labels = percent_format(), limits = c(0,1)) +
coord_flip() +
xlab("") +
ylab("Percent of Respondents Agreeing with Benefits of Using Open Source Software") +
lollipop_theme
ggplotly(s4, tooltip = c('text'))
```