Giovanni Marco Dall'Olio avatar Giovanni Marco Dall'Olio committed 6f37aa4

PLOTS: ADD: plots for generic one-answer questions

Comments (0)

Files changed (2)

Add a comment to this file

results/plots/feedback_charts.pdf

Binary file modified.

src/plot_evaluations.R

 
 pdf("results/plots/feedback_charts.pdf", paper="a4r", width=1200, height=800, title="Leipzig workshop feedback 2012")
 
+
+generic_questions_plot = list (theme_bw(),
+        geom_bar(aes(x=answer)),
+        facet_wrap(~question, scales='free'), 
+        opts(axis.text.x=theme_text(angle=0, hjust=0.5, vjust=1 ))
+        )
+
 barchart_plot = list (theme_bw(),
         geom_bar(width=1),
         opts(legend.position='bottom'),
         scale_x_discrete("Student (Timestamp of when the feedback form was filled)")
         )
 
+
+# Generic questions
+plot_title = "Generic questions"
+print(plot_title)
+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 <- gsub("\\.", " ", feedback.overall.long$question, perl=T)
+feedback.overall.long$answer <- gsub("([\\w()']*\\s[\\w()']*)\\s", "\\1\n", feedback.overall.long$value, 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)
+
+
 # Quality of the lecture
 #png("feedback_quality_piechart.png")
 #dev.new()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.