Skip to content

Commit

Permalink
various updates that never got pushed to github
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Mar 11, 2015
1 parent 9bd6c40 commit f385beb
Show file tree
Hide file tree
Showing 9 changed files with 448 additions and 34 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exclude:
- 'README.md'
- '*.Rmd'
- 'knitr-cache/'
- '*.csv'

## Metadata
title: From the Bottom of the Heap
Expand Down
5 changes: 5 additions & 0 deletions _includes/cc-by-icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<a href="http://creativecommons.org/licenses/by/3.0/" class="addToolTip" data-toggle="tooltip" data-placement="top" data-animation="true" title="Creative Commons By Attribution 3.0 Licence" data-original-title="Creative Commons By Attribution 3.0 Licence">
<i class="icon">
<img src="{{ site.url }}/assets/img/cc-by.png" class="licence-icon" />
</i>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ tags:
- R
- Science
- Time series
alert: "<strong>Updated</strong> This post was updated on 17 July 2011 following comments from readers."
alert: "<strong>Updated</strong> The URL to the HadCRUT3v data set changed following the release of version 4 of the data set (12 January 2015).<br>
<strong>Updated</strong> This post was updated on 17 July 2011 following comments from readers."
---

Yesterday (June 11, 2011) the [BBC](http://www.bbc.co.uk/news/) [reported](http://www.bbc.co.uk/news/science-environment-13719510) on comments by [Prof. Phil Jones](http://www.uea.ac.uk/env/people/facstaff/jonesp), of the [Climatic Research Unit](http://www.cru.uea.ac.uk/) (CRU), [University of East Anglia](http://www.uea.ac.uk/) (UEA), that the warming experienced by the planet since 1995 was statistically significant. That the trend in the recent data was now significant when last year it was not, was attributed to the fact that one more data point (year) was now available for the analysis and Jones highlighted the utility of long-term monitoring data as more data is collected in detecting pattern in noisy data. In this post I wanted to take a closer look at these data and illustrate how we can use R to fit regression models to time series data.

I will look at the [HadCRUT3v](http://www.cru.uea.ac.uk/cru/data/temperature/) data set, using the global mean version of the data. I don't know specifically that Jones was commenting on these particular data as I have been unable to identify a source for his comments other than the information in the BBC article, but it seems plausible that Jones was talking about these data. To load these data into R we use

{% highlight r %}
URL <- url("http://www.cru.uea.ac.uk/cru/data/temperature/hadcrut3vgl.txt")
URL <- url("http://www.cru.uea.ac.uk/cru/data/temperature/HadCRUT3v-gl.dat")
gtemp <- read.table(URL, fill = TRUE)
{% endhighlight %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- Time series
active: blog
category: R
alert: "<strong>Updated</strong> The URL to the HadCRUT3v data set changed following the release of version 4 of the data set (12 January 2015)."
---

[Earlier, I looked at the HadCRUT3vgl data](http://www.fromthebottomoftheheap.net/2011/06/11/global-warming-since-1995-now-significant/ 'Global warming since 1995 &apos;now significant&apos;') set using generalized least squares to investigate whether the trend in temperature since 1995 was statistically significant. Here I want to follow-up one of the points from the earlier posting; namely using a statistical technique that fits a local, and not global, model to the entire time series and see how that informs our knowledge of trends in the recent period.
Expand All @@ -35,7 +36,7 @@ source(tmp)

{% highlight r %}
## Global temperatures
URL <- url("http://www.cru.uea.ac.uk/cru/data/temperature/hadcrut3vgl.txt")
URL <- url("http://www.cru.uea.ac.uk/cru/data/temperature/HadCRUT3v-gl.dat")
gtemp <- read.table(URL, fill = TRUE)
## Don't need the even rows
gtemp <- gtemp[-seq(2, nrow(gtemp), by = 2), ]
Expand Down
Loading

0 comments on commit f385beb

Please sign in to comment.