Skip to content

Instantly share code, notes, and snippets.

@cavedave
Created June 17, 2016 14:29
Show Gist options
  • Save cavedave/f76bfe63cea7a5a4490bed9ba10335ce to your computer and use it in GitHub Desktop.
Save cavedave/f76bfe63cea7a5a4490bed9ba10335ce to your computer and use it in GitHub Desktop.
Englands temperature since 1659
#Dataset is cetml1659on.dat from hadcet [here](http://www.metoffice.gov.uk/hadobs/hadcet/data/download.html)
mydata = read.csv("cetml1659on.csv", header=TRUE)
gg<- ggplot(mydata, aes(x=Date, y=YEAR)) +
geom_point(shape=1) + # Use hollow circles
geom_smooth(method=lm)
plot.title = 'England Temperatures Since 1659'
plot.subtitle = 'HadCET Data. Correlation of Year and Temp .41 @iamreddave'
gg <- gg + ggtitle(bquote(atop(.(plot.title), atop(italic(.(plot.subtitle)), ""))))
gg <- gg + labs(x="YEAR", y="Degrees C")
gg <- gg + theme_tufte(base_family="Helvetica")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment