Visuzaliation of Likert Scaled Data

R can read data directly from the web. PISA data is freely available. But be careful, the dataset is about ~230Mb. However, there is a funny likert scaled item: 'Declarative Fraction'. 'Declarative Fraction' is a bogus term and students were asked for their understanding of the concept to check how confidently students would pretend to know about a concept that does not exist. Obviously this raises the gender questions once again…

# load the data, not evaluated here, cause dataset is relatively large.
con <- url("http://beta.icm.edu.pl/PISAcontest/data/student2012.rda")
load(con)
# make sure to install from devtools, cause CRAN is outdated.  and does not
# support summary.  require(devtools) install_github('likert','jbryer')
# load('data/pisa.RData')
library(ggplot2)
library(reshape2)
library(likert)
library(intsvy)

# variable ST62Q13 codes familiarity with 'Declarative Fraction' tab <-
# pisa.table(variable='ST62Q13', by='ST04Q01', data=student2012)
load("../data/pisa_tabbed.RData")
ptab <- acast(tab, ST04Q01 ~ ST62Q13, value.var = "Percentage")
ddat <- data.frame(Item = rownames(ptab), ptab)

# plot it with the likert package
likert.bar.plot(likert(summary = ddat), center = 2) + ggtitle("Declarative Fraction") + 
    theme_bw()

plot of chunk unnamed-chunk-2

Would be interesting to see other groups such as countries? How could we visualize a gender - country comparison?