Created
February 8, 2012 22:14
-
-
Save thomasjensen/1774468 to your computer and use it in GitHub Desktop.
eurobarometer survey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
setwd("/path/to/file/") | |
data <- read.csv("ebAll.csv") | |
data$date <- as.Date(data$date, format = "%y/%m/%d") | |
data$Tend.to.trust <- as.numeric(gsub("%","",data$Tend.to.trust)) | |
data$Tend.not.to.trust <- as.numeric(gsub("%","",data$Tend.not.to.trust)) | |
data$DK...Don.t.know <- as.numeric(gsub("%","",data$DK...Don.t.know)) | |
ggplot(data[data$MS == "EU",], aes(x = date, y = Tend.to.trust, group = Question, linetype = Question)) + | |
geom_line() + | |
theme_bw() + | |
facet_grid(.~MS) + | |
xlab("") + | |
ylab("Trust in Percent") + | |
opts(axis.text.x = theme_text(angle=90, hjust=0, size=10)) | |
ggplot(data[data$MS %in% c("Greece","Ireland","Portugal"),], aes(x = date, y = Tend.to.trust, group = Question, linetype = Question)) + | |
geom_line() + | |
theme_bw() + | |
facet_grid(.~MS) + | |
xlab("") + | |
ylab("Trust in Percent") + | |
opts(axis.text.x = theme_text(angle=90, hjust=0, size=10)) | |
ggplot(data[data$MS == "Denmark",], aes(x = date, y = Tend.to.trust, group = Question, linetype = Question)) + | |
geom_line() + | |
theme_bw() + | |
facet_grid(.~MS) + | |
xlab("") + | |
ylab("Trust in Percent") + | |
opts(axis.text.x = theme_text(angle=90, hjust=0, size=10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment