Commits

Giovanni Marco Dall'Olio committed 2a58562

2014: added piechart and Room Quality question

Comments (0)

Files changed (2)

results/plots/feedback_charts_2014.pdf

Binary file modified.

src/plot_evaluations.R

 TalksRateIndex          = c(72:75)
 TalksRelevanceIndex     = c(76:79)
 TalksLengthIndex        = c(80:83)
-GenericQuestionIndex       = c(1, 88, 89, 90, 91, 2, 93)
-GenericQuestion2Index      = c(1, 11, 3, 4, 9, 85, 6, 86, 84, 87)
+GenericQuestionIndex       = c(1, 88, 89, 90, 91, 2, 3, 4, 93)
+GenericQuestion2Index      = c(1, 11, 9, 10, 85, 6, 86, 84, 87)
 print (GenericQuestionIndex)
 print (names(feedback)[GenericQuestionIndex])
 print (GenericQuestion2Index)
         geom_bar(width=1),
         theme(legend.position='bottom'),
         facet_wrap(~variable, nrow=3),
-        theme(axis.text.x=element_text(angle=45, hjust=1, vjust=1 )),
+#        theme(axis.text.x=element_text(angle=45, hjust=1, vjust=1 )),
+        theme(axis.text.x=element_blank( )),
+        theme(axis.text.y=element_blank( )),
+        theme(axis.ticks.y=element_blank( )),
+        coord_polar(theta = "y")
 #        opts(axis.text.x=element_text(angle=90, hjust=0.4 )),
-#        coord_polar(theta='y'),
 #        scale_fill_brewer(type="seq", palette=2),
-        scale_x_discrete("answer")
+#        scale_x_discrete("answer")
 #        scale_fill_brewer(palette="RdPu")
 #        coord_polar() 
 #        scale_fill_brewer(palette="PuRd")
     feedback.overall.long$question <- gsub( # 2
             "How would you rate the overall organization of the course",
             "How would you rate the\noverall organization of the course?", feedback.overall.long$question)
+    feedback.overall.long$question <- gsub( # 3
+            "In general.* length of the course", 
+            "In general what did you think\nabout the length of the course?", feedback.overall.long$question, perl=T)    
+    feedback.overall.long$question <- gsub( # 4
+            "What did you think of the ratio of teaching versus scientific lectures", 
+            "What did you think of the ratio\nof teaching versus scientific lectures?", feedback.overall.long$question, perl=T)    
     feedback.overall.long$question <- gsub( # 93
             "Would you recommend this course to your colleagues", 
             "Would you recommend this course\nto your colleagues?", feedback.overall.long$question)   
     feedback.overall.long$question <- gsub( # 11
             "How did you find the ratio lectures exercises",
             "How did you find\nthe ratio lectures exercises?", feedback.overall.long$question)
-    feedback.overall.long$question <- gsub( # 3
-            "In general.* length of the course", 
-            "In general what did you think\nabout the length of the course?", feedback.overall.long$question, perl=T)    
-    feedback.overall.long$question <- gsub( # 4
-            "What did you think of the ratio of teaching versus scientific lectures", 
-            "What did you think of the ratio\nof teaching versus scientific lectures?", feedback.overall.long$question, perl=T)
+
+    feedback.overall.long$question <- gsub( # 9
+            "How would you rate the room infrastructure and layout",
+            "How would you rate the\nroom infrastructure and layout?", feedback.overall.long$question)
     feedback.overall.long$question <- gsub( # 9
             "How would you rate the computer infrastructure",
             "How would you rate\nthe computer infrastructure?", feedback.overall.long$question)
     print (unique(feedback.overall.long$question))
     cat('\n')
 
+    print(levels(factor(feedback.overall.long$answer)))
     # FIX: manually fixing some answer labels
+    print(levels(factor(feedback.overall.long$answer)))
+    feedback.overall.long$answer <- gsub("^\\s*", "", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("\\s*$", "", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("\\.", " ", feedback.overall.long$answer, perl=T)
     feedback.overall.long$answer <- gsub("^More scientific.*", "More scientific\nlectures, please", feedback.overall.long$answer, perl=T)
     feedback.overall.long$answer <- gsub("^More teaching.*", "More teaching\non programming", 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(".*o fresh air.*", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("open windows needed", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("MORE WINDOWS!!!!", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("room need more windows.*", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub(".*ventilation.*", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub(".*air flow.*$", 
+        "No Fresh Air!!", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("Projector.*$", 
+        "Projector too far", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub(".*projection.*$", 
+        "Projector too far", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("chairs are horrible! :\\)", 
+        "Bad Chairs", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("the chairs are bad", 
+        "Bad Chairs", feedback.overall.long$answer, perl=T)
+    feedback.overall.long$answer <- gsub("to many people in 1 room.*", 
+        "Too many people", feedback.overall.long$answer, perl=T)
+    print(levels(factor(feedback.overall.long$answer)))
+    print(levels(factor(subset(feedback.overall.long, question %in% "infrastructure")$answer)))
     feedback.overall.long$answer <- gsub("([\\w()']*\\s[\\w()']*)\\s", "\\1\n", 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)
     p <- ggplot(data=feedback.overall.long) + generic_questions_plot + ggtitle(plot_title)
     print(p)
 
         barchart_plot +
         scale_fill_brewer(palette="Blues")
     print(p)
+    p <- ggplot(aes(x=factor(1), fill=factor(answer)), data=feedback.quality.long) +
+        ggtitle(paste(plot_title, "(Pie charts)")) + 
+        pie_plot +
+        scale_fill_brewer(palette="Blues")
+    print(p)
 ##qplot(data=feedback.quality.long, x=answer, stat="bin", fill=answer, main=paste(plot_title, "(Pie charts)")) + pie_plot + coord_polar(theta="y")
     p <- ggplot(data=subset(feedback.quality.long, !answer=='NA' ), fill='#2b8cbe') + 
         geom_violin(aes(x=variable, y=as.numeric(answer)), colour="black", fill='#2b8cbe') + 
     p <- qplot(data=feedback.relevance.long.noIdontknow, x=answer, fill=answer, main=paste(plot_title, "(Bar charts)")) + 
         scale_fill_brewer(palette="RdPu") +
         barchart_plot
+    print(p)
+    p <- ggplot(aes(x=factor(1), fill=factor(answer)), data=feedback.relevance.long) +
+        ggtitle(paste(plot_title, "(Pie charts)")) + 
+        pie_plot +
+        scale_fill_brewer(palette="RdPu")
 #qplot(data=feedback.relevance.long.noIdontknow, stat="bin", x=answer, fill=answer, main=paste(plot_title, "(Pie charts)")) + pie_plot + coord_polar(theta="y")
     print(p)
     print(summary(feedback.relevance.long.noIdontknow))
         scale_fill_brewer(palette="Greens") +
         barchart_plot
     print(p)
+    p <- ggplot(aes(x=factor(1), fill=factor(answer)), data=feedback.length.long) +
+        ggtitle(paste(plot_title, "(Pie charts)")) + 
+        pie_plot +
+        scale_fill_brewer(palette="Greens")
+    print(p)
 #ggplot(data=feedback.length.long, aes(x=answer, fill=factor(answer)), main=paste(plot_title, "(Pie charts)")) + pie_plot + coord_polar(theta="y")
     p <- ggplot(data=na.omit(feedback.length.long)) + 
         violin_plot + 
 
 
 generic_questions()
-qualitylecture()
-relevance()
-lecture_length()
+#qualitylecture()
+#relevance()
+#lecture_length()
 
 print("ok")