Putting Consolidated Global Temperature Data on-line

In this post I describe an R script that retrieves monthly global temperature anomaly data from 5 sources and consolidates the data into a single CSV file. I then post the consolidated file in an on-line  Google spreadsheet so that users can download the data and conduct their own global temperature trend analysis.

Global Climate Trends

There are many blogs and web sites (small sample: 1, 2, 3, 4, 5, 6) with multiple opinions on global climate trends. Some sites are data oriented and others are opinion oriented. What is a charter to think?

My advice, take a look at the data for yourself. As an Excel or R charter, why not analyze it yourself to get a better appreciation for what is going on.

To help you get started, I’ve developed a consolidated monthly CSV file that presents  the 5 major global land and ocean temperature anomaly data series: GISS, NOAA, HADCrut3, RSS and UAH. This page gives some additional information.

Google Spreadsheet

Here’s the link to my Google spreadsheet of the monthly data. I’ve  tried to simply download and consolidate the raw data as provided by the source sites. My goal is to present the data in a simple CSV format so that Excel, R and other software charters can evaluate the trends without having to struggle through the  source data re-formatting process.

R Script

The source files are a little messy from a charting standpoint, each needs its own reformat procedure. I’ve posted my R script at this link.


Peter Gallagher submitted a comment adding a ggplot2 script for the test plot I made at the end of my R script. Since it took me way to long to get the basic data handling done, I was burned out and just put together an ugly chart of the 5 data series to make sure the data transfer worked.

Peter’s ggplot2 snipet is just great. Thanks Peter! Here’s what it looks like.


15 responses to “Putting Consolidated Global Temperature Data on-line

  1. Pingback: Do It Yourself Climate Trend Analysis | Climate Charts & Graphs

  2. Your google data were a handy set against which to test the new, public Eureqa equation generator (http://ccsl.mae.cornell.edu/eureqa).

    Given the liberty to use cosines and sines in equations it generates, Eureqa predicted the NOAA data moderately well (I converted the dates to months numbered from 0 (Jan 1979) through 365 (June 2009).

    0.0861564 + 0.00136793*Month – 0.0650757*sin(-0.140588*Month)

    R^2 on this rising sine curve was 0.691


  3. Pingback: Global Sea Surface Temperature Trends (1850-2009)/ « Charts & Graphs with R

  4. This will be excellent. I already plot some of these, but having access to all five will be very helpful. I haven’t tested it yet. Hope it’s easy to do.

  5. How could I put those .txt data into an EXCEL table?

    PD: Excuse me for the “ffffff”. I was just ckecking that you can actually receive my post.

    • You can easily download the Google spreadsheet:

      1. With Google spreadsheet open, press File (left side of menu bar)
      2. Choose Export – this will give you 6 choices, including csv, txt, and xls

  6. Nice work with the Tableau visualization Joe.

  7. Hi Kelly,

    Many thanks for this. A very useful piece of work (the R script, especially).

    I’ve found the best way to use the data downloaded is to add a few lines to the bottom of the script in place of the current ‘test’ plot:

    # convert from wide to long format
    myDat<-melt(consol_lo, id="yr")
    # display in a faceted grid with variable scales for each facet
    qplot(yr, value, data=myDat, geom="line", group=variable) + facet_grid(variable ~ ., scale = "free_y")

    • Peter

      Thanks for the ggplot2 check plot script. I tried it and agree that it is much better than my version, so I’ve updated my R script with your version.

      I’ve also added your plot in the post. Thanks

  8. Hey this is awesome! Thanks!

  9. Thank you for putting together a great data set.

    Here is my first pass at visualizing the data, an interactive dashboard in Tableau:

    You can select or shift-select the measure names, drag the slider and slider ends, or type in the date range.

    If you do not have a copy of Tableau, you can download the reader at:

    or here is a screen capture of it:

    • Joe

      Thanks for taking the time to make your chart. I’ll be adding more climate data via Google docs, so I look forward to your contributions.

    • Kelly,

      I look forward to visualizing any other data you have in store to share. In the mean time, I added the ability to filter the metrics in addition to highlighting, so both filtering and highlighting can be done at the same time.

      In other to do this in Tableau, I used Lyza, http://lyzasoft.com, to reshape your provided data set by appending the different metrics as additional rows instead of all values on the same row for each month.

      Packed workbook:

      Screen shot:

  10. This is a great idea! Unfortunately, the Google Spreadsheet won’t open without permissions. Is this intentional or did you mean to make it a publicly accessible spreadsheet?

    • Michael

      Sorry – I wanted it publicly available. I’ve fixed.

      Please let me know if you have any problem accessing the Google doc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s