Click here to see the SAS code.
Click here to see the example.
---------------------------------------------------------------
See my blog for more information about this graph!
Based on the following:
http://www.drroyspencer.com/wp-content/uploads/UAH_LT_1979_thru_August_2011.png
http://www.drroyspencer.com/wp-content/uploads/UAH_LT_1979_thru_Mar_10.gif
http://www.drroyspencer.com/latest-global-temperatures/
http://vortex.nsstc.uah.edu/data/msu/t2lt/uahncdc.lt
I created this SAS version.
It reads the txt data directly from the 3rd link above.
It uses 'proc expand' to calculate the moving 13-month average (ie, the red line).
It uses 2 overlayed plots in SAS/Graph gplot.
It has charttips and drilldowns.
Probably the most important part of this example is the use of "proc expand"
to calculate the values for the 13-month moving-average (and trimming the
6 values off the ends), so that the red line represents the same thing it
did in the original plot ...
/* Compute the moving average (13-month window) */
proc expand DATA=uahncdc OUT=uahncdc;
convert global_avg = global_avg13 / METHOD = none TRANSFORMOUT = (cmovave 13 trim 6);
run;
Note: I'm not sure if these temperature deviation values are all in Celsius
or Fahrenheit, or a mixture - maybe the USA48 numbers are Fahrenheit, because
they look a lot bigger than the Northern Hemisphere numbers(?) The Global
numbers seem to be Celsius, since they match the Global numbers in the charts
in the URLs above (and the axis is labeled Celsius in that chart).
-----
I've added html anchors, so you can go directly to certain graphs:
Global
Global_Land
Global_Ocean
Northern_Hemisphere
Northern_Hemisphere_Land
Northern_Hemisphere_Ocean
Southern_Hemisphere
Southern_Hemisphere_Land
Southern_Hemisphere_Ocean
Tropics
Tropics_Land
Tropics_Ocean
North_Extratropic
North_Extratropic_Land
North_Extratropic_Ocean
South_Extratropic
South_Extratropic_Land
South_Extratropic_Ocean
North_Pole
North_Pole_Land
North_Pole_Ocean
South_Pole
South_Pole_Land
South_Pole_Ocean
Australia
USA_49
USA_48
Back to Samples Index