#Data obtained from https://www.theice.com/marketdata/reports/ReportCenter.shtml
#and saved to https://docs.google.com/file/d/0B8LhMBA3NXL4ZUw2UGZiZXIweWM/edit
#Download to your R working directory
c <- read.csv("ice-ecr-cers-price.csv",skip=1, header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE)
#str(c)
'data.frame': 1295 obs. of 5 variables:
$ Date : Factor w/ 259 levels "2011/12/30","2012/01/03",..: 1 1 1 1 1 2 2 2 2 2 ...
$ Spot : Factor w/ 259 levels "2011/12/30","2012/01/03",..: 1 1 1 1 1 2 2 2 2 2 ...
$ Strip : Factor w/ 17 levels "Apr12","Aug12",..: 3 4 5 6 9 3 4 5 6 9 ...
$ Price : num 4.16 5.01 5.28 5.56 4.21 3.93 4.79 4.93 5.23 3.86 ...
$ monthinadvance: int 12 24 36 48 1 11 23 35 47 0 ...
spot<-c(c[c$monthinadvance<1,])
library("RSVGTipsDevice")
devSVGTips(file="cers-spot-prices-2012.svg",toolTipMode=0,width=8.5,height=6.5)
par(mar=c(5,5,5,4)+0.1,cex.main=1.5,cex.lab=1)
with(spot,plot(Date,Price,las=1,type='l',cex.lab=1.2,lwd=3,ylab="Price Euros",col='2'))
title(cex.main=1.6,cex.lab=1,main="Certified emission reduction spot prices 2012",xlab="Date")
mtext(side=1,cex=0.9,line=-1.5,"Source: https://www.theice.com/marketdata/reports/ReportCenter.shtml")
box(lwd=2)
grid()
dev.off()