Commits

Giovanni Marco Dall'Olio  committed 4bc6e2d

PLOTS: manually cleaning labels in generic questions plots.

Now I am done, I need to go back to my work!! :-)

  • Participants
  • Parent commits 7921f49

Comments (0)

Files changed (2)

File results/plots/feedback_charts.pdf

Binary file modified.

File src/plot_evaluations.R

 
 generic_questions_plot = list (theme_bw(),
         geom_bar(aes(x=answer)),
-        facet_wrap(~question, scales='free'), 
+        facet_wrap(~question, scales='free', nrow=3), 
         opts(axis.text.x=theme_text(angle=0, hjust=0.5, vjust=1 ))
         )
 
 feedback.overall.long <- melt(feedback.overall, id.vars="Timestamp")
 feedback.overall.long <- feedback.overall.long[complete.cases(feedback.overall.long),]
 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("(\\w*\\.\\w*\\.\\w*\\.\\w*\\.\\w*)\\.", "\\1\n", feedback.overall.long$question, perl=T)
+feedback.overall.long$question <- gsub("\n$", "", feedback.overall.long$question, perl=T)
 feedback.overall.long$question <- gsub("\\.", " ", feedback.overall.long$question, perl=T)
 # FIX: manually fixing some labels
-feedback.overall.long$question <- gsub("What did you think of the\\s*ratio of teaching versus scientific lectures\n", "What did you think of the ratio\nof teaching versus scientific lectures", feedback.overall.long$question, perl=T)
-feedback.overall.long$question <- gsub("In general.*\n.*\n.*", "In general what did you think\nabout the length of the course", feedback.overall.long$question, perl=T)
-# FIX: merging "Department bullettin" and "Internal Institute mail" answers together
+feedback.overall.long$question <- gsub("What did .*ratio of teaching versus scientific lectures\n", "What did you think\nof the ratio of teaching versus\nscientific lectures", feedback.overall.long$question, perl=T)
+feedback.overall.long$question <- gsub("In general.*\n.*\n.*", "In general what did\nyou think about the length\nof the course", feedback.overall.long$question, perl=T)
+# FIX: merging "Department bullettin", "mailing list" and "Internal Institute mail" answers together
 feedback.overall.long$answer <- factor(feedback.overall.long$value)
-feedback.overall.long$answer <- gsub("internal.*", "Institute\n/Department\nmailing list", feedback.overall.long$answer, perl=T)
-feedback.overall.long$answer <- gsub("^Department.*", "Institute\n/Department\nmailing list", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^mailing.*", "Mailing list\n(Institute/\nDepartment/\nother)", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^internal.*", "Mailing list\n(Institute/\nDepartment/\nother)", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^Department.*", "Mailing list\n(Institute/\nDepartment/\nother)", feedback.overall.long$answer, perl=T)
+# FIX: manually fixing some answer labels
+feedback.overall.long$answer <- gsub("^Evoldir.*", "Evoldir\nwebsite", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^More scientific.*", "More\nscientific\nlectures,\nplease", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("^More teaching.*", "More\nteaching\non\nprogramming", feedback.overall.long$answer, perl=T)
+feedback.overall.long$answer <- gsub("10 years", "10\nyears", 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)