Skip to content

Instantly share code, notes, and snippets.

@soodoku
Created November 7, 2017 18:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save soodoku/40b3248276e0f987f75cfa810dbc0e0c to your computer and use it in GitHub Desktop.
# Output = http://gbytes.gsood.com/2013/11/02/the-fairest-of-them-all/
# Uses cces_recode.R here: https://github.com/soodoku/in-n-out/scripts/cces_recode.R
# Plotting the fairest of all media
library(lattice)
png("fairmedia.png")
dotplot(t(t(table(droplevels(cces06$fairmedia[cces06$fairmedia != "Don't know"]), cces06$pid3[cces06$fairmedia != "Don't know"]))/colSums(table(droplevels(cces06$v2112[cces06$fairmedia != "Don't know"]), cces06$pid3[cces06$fairmedia != "Don't know"]))),
main = "Which network do you think provides the \n fairest coverage of national news?",
xlab = list(label = ""),
par.settings = simpleTheme(col = c("blue", "grey", "red")),
auto.key = list(space = "bottom", columns = 3, x = .6, y = .7, corner = c(0, 0)))
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment