Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
add english plots, opens #30
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Apr 10, 2019
1 parent 4a45c62 commit 35d80e9
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 24 deletions.
17 changes: 16 additions & 1 deletion _site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@ navbar:
text: Plots
href: crowd_de_files/
- text: "Appendix (english)"
href: appendix.html
menu:
- icon: fa-html5
text: HTML
href: appendix.html
- icon: fa-file-pdf
text: PDF (Springer)
href: appendix.pdf
- icon: fa-file-word
text: Word
href: appendix.docx
- icon: fa-file-code
text: LaTeX (Springer)
href: appendix.tex
- icon: fa-file-image
text: Plots
href: appendix_files/
right:
- icon: fa-pen
text: Edit
Expand Down
60 changes: 39 additions & 21 deletions analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ plot_battery <- function(m, items = NULL, condition = "expect_crowd", lang = "en
items <- colnames(m)
}

quest %>%
dplyr::filter(section == condition) %>%
dplyr::filter(var %in% items) %>%
dplyr::mutate(var_german = stringr::str_wrap(string = var_german, width = width)) %>%
{.} -> df
long <- glue::glue_data(
.x = df,
"...{var_german}",
"({short_german}/{var})",
.sep = "\n"
)
long <- rlang::set_names(x = long, nm = df$var)
if (lang == "de") {
quest %>%
dplyr::filter(section == condition) %>%
dplyr::filter(var %in% items) %>%
dplyr::mutate(var_german = stringr::str_wrap(string = var_german, width = width)) %>%
{.} -> df
long <- glue::glue_data(
.x = df,
"...{var_german}",
"({short_german}/{var})",
.sep = "\n"
)
long <- rlang::set_names(x = long, nm = df$var)
} else {
long <- colnames(m)
}


# munge data
m[, items] %>%
Expand Down Expand Up @@ -59,7 +64,11 @@ plot_battery <- function(m, items = NULL, condition = "expect_crowd", lang = "en
# color by platform, but no guide
g <- g + scale_fill_discrete(name = "Platforms") + guides(fill = FALSE)
} else {
g <- g + scale_fill_discrete(name = "Dimension der Leistungsgerechtigkeit")
if (lang == "de") {
g <- g + scale_fill_discrete(name = "Dimension der Leistungsgerechtigkeit")
} else {
g <- g + scale_fill_discrete(name = "Dimensions of Fairness")
}
}

if (lang == "de") {
Expand All @@ -69,21 +78,30 @@ plot_battery <- function(m, items = NULL, condition = "expect_crowd", lang = "en
}

if (diff) {
g <- g + labs(
subtitle = "In meiner Erwerbsarbeit / In meiner Tätigkeit als CrowdworkerIn ist es mir wichtig, dass ..."
# subtitle = as_vector(quest[quest$section == "expect_crowd", "section_intro_german"])[1]
)
if (lang == "de") {
g <- g + labs(
subtitle = "In meiner Erwerbsarbeit / In meiner Tätigkeit als CrowdworkerIn ist es mir wichtig, dass ..."
# subtitle = as_vector(quest[quest$section == "expect_crowd", "section_intro_german"])[1]
)
g <- g + xlab("Unterschied in der Zustimmung")

} else {
g <- g + labs(
subtitle = "In my job as a (crowd)worker, it is important to me that..."
)
g <- g + xlab("Difference in Agreement")
}
} else {
g <- g + labs(
subtitle = "Bei meiner Tätigkeit als CrowdworkerIn ist es mir wichtig, dass ..."
# subtitle = as_vector(quest[quest$section == "expect_crowd", "section_intro_german"])[1]
)
if (lang == "de") {
g <- g + labs(
subtitle = "Bei meiner Tätigkeit als CrowdworkerIn ist es mir wichtig, dass ..."
)
} else {
g <- g + labs(
subtitle = "In my job as a (crowd)worker, it is important to me that ..."
)
}

g <- g + xlab(NULL)
g <- g + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1))
if (lang == "de") {
Expand Down
38 changes: 36 additions & 2 deletions appendix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ output:
toc_float: no
smart: yes
fig_caption: yes
always_allow_html: yes
---

```{r import, include=FALSE, eval=FALSE}
Expand Down Expand Up @@ -185,8 +186,29 @@ Such subtle shifts in emphasis may contribute small shifts in ratings, or may, i


```{r battery, fig.cap=paste(c("Work", "Crowdwork"), "Expectations (Heatmap of Counts)"), fig.width=12, fig.height=10}
plot_battery(m = crowddata$exp_work, condition = "expect_work")
plot_battery(m = crowddata$exp_crowd, condition = "expect_crowd")
plot_battery(m = crowddata$exp_work, condition = "expect_work", lang = "en")
plot_battery(m = crowddata$exp_crowd, condition = "expect_crowd", lang = "en")
```

```{r crowd, fig.cap="Crowdwork Expectations (Heatmap of Counts)", fig.width=12, fig.height=10}
interesting <- NULL
interesting$Renumeration <- c("wage_organisation", "wage")
interesting$Briefing <- c("transparent_tasks", "expectations")
interesting$Assessment <- c(
"dissent_eval",
"consistent_eval",
"influence_eval",
"evaluation",
"transparent_eval"
)
interesting$Planning <- c("safe_job")
plot_battery(
m = crowddata$exp_crowd,
items = unlist(interesting),
width = 55,
lang = "en",
concepts = interesting
)
```

The above figures \@ref(fig:items-scores) and \@ref(fig:battery) show relatively little variance within and across the measured 28 variables in both contexts.
Expand All @@ -202,6 +224,18 @@ plot_battery(
)
```

```{r diff, fig.cap="Expectations Towards Regular Employment - Crowdwork", fig.width=12, fig.height=10}
m <- crowddata$exp_work - crowddata$exp_crowd
plot_battery(
m = m,
items = unlist(interesting),
width = 55,
lang = "en",
concepts = interesting,
diff = TRUE
)
```

There is also not much difference in the rankings of the variable compared between the two contexts.
In figure \@ref(fig:difference), the individual crowdwork scores are subtracted from the work scores, and the results are then counted.
For example, the counts for a `-3` in figure \@ref(fig:difference) is the number of participants who rate the item in question *3* levels higher in the crowd than in the regular work context.
Expand Down
10 changes: 10 additions & 0 deletions render.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ rmarkdown::render(
output_format = bookdown::word_document2(),
output_dir = "_site"
)
rmarkdown::render(
input = "appendix.Rmd",
output_format = bookdown::pdf_book(base_format = rticles::springer_article),
output_dir = "_site"
)
rmarkdown::render(
input = "appendix.Rmd",
output_format = bookdown::word_document2(),
output_dir = "_site"
)

0 comments on commit 35d80e9

Please sign in to comment.