Plot the State of the Union Global Temperature Data in Minitab

President Obama delivers the 2015 State of the Union address.In the State of the Union Address, President Obama said:

“No challenge — no challenge — poses a greater threat to future generations than climate change. 2014 was the planet’s warmest year on record. Now, one year doesn’t make a trend, but this does — 14 of the 15 warmest years on record have all fallen in the first 15 years of this century.”

This follows the joint announcement by NASA and NOAA on January 16th indicating their agreement with the Japan Meteorological Agency that 2014 was the warmest year on record. If you haven't noticed them already, that means that you're going to see a lot of charts of average temperatures over time. If you're part of the DIY crowd, then you'll want to make your very own chart to look at the data in Minitab's statistical software.

First things first, you'll need to get the data. There are a lot of different data sets out there with different baselines and units. I'm going to pick this text file from NASA because it has some great things I can show you about opening the data in Minitab. The numbers in the data set represent the difference between the absolute global mean for 1951-1980 (14 degrees Celsius) in hundredths of degrees Celsius. A value of 68 represents a year with an average temperature of 14.68 degrees Celsius.  

Unfortunately, when you're working with someone else's data, the format's never quite right. Fortunately, Minitab can do most of the work for you at the same time that you open the data. In the following steps, you can see how to get column titles that aren’t the first row in a file and how to cut out footnotes that aren’t part of the data.

  1. Choose File > Open Worksheet.
  2. Change Files of type to Text (*.txt) and select the file that you downloaded from NASA.
  3. Click Options.
  4. In Variable Names, select Use row and enter 8.
  5. In Number of data rows, enter 141.
  6. Check Ignore blank data rows.
  7. In Field Definition, select Free format. Click OK.

A preview of your data is always a good idea before you click Open. With this data, the preview is especially important. Because the month headers are repeated in the data set, Minitab detects that several of the columns are lists of months instead of differences from 14 degrees Celsius. These columns are assigned the Date/Time format.

The column C2 should have numeric values in it, but shows abbreviations for months instead.

 In the preview, you can specify the correct data formats for columns.

  1. Click Preview.
  2. For columns C2 to C13, select Numeric.
  3. Click OK, then click Open.

The dataset is almost ready, but it still includes the column headers that were repeated. (Scroll down to row 22 and you’ll see them represented as numbers.)

Repeated month headers are incorrect data that needs to be cleaned.

To eliminate the repeated headers quickly, we can subset the worksheet.

  1. Choose Data > Subset Worksheet.
  2. In Include or Exclude, select Specify which rows to exclude.
  3. Click Condition.
  4. In Condition, enter ‘Jan’ > 42000.
  5. Click OK.

Now you’re all set to make your own charts of temperature over time. The most straightforward chart to make is probably a time series plot, like this one:

Red symbols show the 15 highest values in the series.

While I can't be certain the president was referring to this particular NASA dataset, the trend holds here. Red symbols, comprising all of the data from this century, show the 15 highest temperatures in the series. The older exception is from the year 1998.

The image of the President Obama delivering the 2015 State of the Union address is by Pete Souza and is licensed under this Creative Commons License.


blog comments powered by Disqus