1. Giovanni Marco Dall'Olio
  2. leipzig_feedback

Commits

Giovanni Marco Dall'Olio  committed 083d9bc

FIX: PLOTS: making labels slightly more readable in "overall" plots

  • Participants
  • Parent commits 6f37aa4
  • Branches default

Comments (0)

Files changed (2)

File results/plots/feedback_charts.pdf

Binary file modified.

File src/plot_evaluations.R

View file
 feedback.overall <- subset(feedback, select=c(1, 4:6, 8, 9, 86:90, 94, 98, 102))
 feedback.overall.long <- melt(feedback.overall, id.vars="Timestamp")
 feedback.overall.long <- feedback.overall.long[complete.cases(feedback.overall.long),]
-feedback.overall.long$question <- gsub("(\\w*\\.\\w*\\.\\w*\\.\\w*\\.\\w*\\.\\w*)\\.", "\\1\n", feedback.overall.long$variable, perl=T)
+feedback.overall.long$question <- factor(feedback.overall.long$variable)
+feedback.overall.long$question <- gsub("(\\w*\\.\\w*\\.\\w*\\.\\w*\\.\\w*\\.\\w*)\\.", "\\1\n", feedback.overall.long$question, perl=T)
 feedback.overall.long$question <- gsub("\\.", " ", feedback.overall.long$question, perl=T)
-feedback.overall.long$answer <- gsub("([\\w()']*\\s[\\w()']*)\\s", "\\1\n", feedback.overall.long$value, perl=T)
+# FIX: merging "Department bullettin" and "Internal Institute mail" answers together
+feedback.overall.long$answer <- factor(feedback.overall.long$value)
+feedback.overall.long$answer <- gsub("internal.*", "Institute\n/Department mailing list", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^Department.*", "Institute\n/Department mailing list", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("([\\w()']*\\s[\\w()']*)\\s", "\\1\n", feedback.overall.long$answer, perl=T)
 feedback.overall.long$answer <- gsub("\\.", " ", feedback.overall.long$answer, perl=T)
 ggplot(data=feedback.overall.long) + generic_questions_plot + opts(title=plot_title)