library(ggplot2)
d <- read.table("http://dl.dropbox.com/u/950284/young_unemploy.csv",
sep = "\t", header = T, stringsAsFactors = F)
summary(d)
## unemp rate
## Min. :22.8 Min. : 4.00
## 1st Qu.:31.2 1st Qu.: 6.20
## Median :35.4 Median : 7.30
## Mean :37.3 Mean : 7.36
## 3rd Qu.:40.3 3rd Qu.: 8.22
## Max. :77.5 Max. :14.50
d$date <- seq(as.Date("1991/1/1"), as.Date("2012/4/1"), by = "month")
yrng <- range(d$rate)
xrng <- range(d$date)
p <- qplot(date, rate, geom = c("point"), xlab = "", ylab = "Young adult unemployment(%)",
data = d, alpha = I(1/3), pch = I(1)) + theme_bw()
p + stat_smooth(aes(x = date, y = rate), data = d, size = 1, method = "loess")