Forecasting Average Global Temperature
The following examples demonstrate techniques for analyzing time series data sets with the TimeSeriesAnalysis package.
withTimeSeriesAnalysis:
Global Temperature Data
The following example uses a data set containing yearly global temperature measurements from 1901 to 2010. The data is compiled by the Earth Policy Institute from National Aeronautics and Space Administration (NASA) and Goddard Institute for Space Studies (GISS).
The first step is to retrieve the data. The data set is stored in the data center for the Earth Policy Institute.
The Import command can read in the data.
AverageGlobalTemperature≔Importhttp://www.earth−policy.org/datacenter/xls/indicator8_2011_1.xls,output=Matrix27..136,1..2;
The TimeSeries constructor turns this data set into a TimeSeries object.
AverageGlobalTemperature≔TimeSeriesAverageGlobalTemperature..,2,startdate=1901-12-31, frequency=annual,header=Temperature (Degrees Celcius)
The data can be plotted using the TimeSeriesPlot command:
TimeSeriesPlotAverageGlobalTemperature
Visualizing Trend & Modeling Future Global Temperatures
From the previous plot, it can be observed that the time series seems to have an upwards trend. To forecast future temperatures, first find a suitable model to match the actual data. Maple can select a suitable model from a family of 30 related models and adjust it to this time series.
model ≔ ExponentialSmoothingModelAverageGlobalTemperature
model≔< an ETS(A,A,N) model >
To evaluate the fit of the model, view the OneStepForecast:
modelts≔OneStepForecastsmodel,AverageGlobalTemperature
modelts≔?
TimeSeriesPlot⁡modelts,color=Orange,thickness=2,AverageGlobalTemperature,color=Niagara Burgundy,thickness=2,font=Helvetica,14,legendstyle=font=Helvetica
From this plot, you can see that the forecast model follows the data suitably well. Using the model data, you can predict twenty years of future data using the forecast command and include a 95% confidence interval in order to see if the trend for global temperatures continues to increase based on previous data.
ForecastTemperatures≔ForecastExponentialSmoothingModelAverageGlobalTemperature, AverageGlobalTemperature, 20, output=confidenceintervals95
ForecastTemperatures≔?
TimeSeriesPlot AverageGlobalTemperature, ForecastTemperatures, color = Yellow..Red,title=Forecast Global Temperatures 2011 - 2030,thickness =3,font=Helvetica,14,legendstyle=font=Helvetica
From this plot, you can observe that based on the past 100 years of data, the trend indicates that global temperatures will increase.
maxGetDataForecastTemperatures2−minGetDataForecastTemperatures2
0.14671628
Based on the forecast model, you can expect the global temperature to go up 0.15°C over the next twenty years.
Notes
Note: The margin of error for these data is 0.05 °C; as such, it is impossible to distinguish between the years 2005 and 2010 on a statistical level.\nSource: Compiled by Earth Policy Institute from National Aeronautics and Space Administration (NASA), Goddard Institute for Space Studies (GISS), \"Global Land-Ocean Temperature Index in 0.01 degrees Celsius\" at http://data.giss.nasa.gov/gistemp/tabledata/GLB.Ts+dSST.txt, updated January 2011; Reto Ruedy, NASA GISS, e-mail to Alexandra Giese, Earth Policy Institute, 12 January 2010.
Source: http://www.earth-policy.org/datacenter/xls/indicator8_2011_1.xls
Download Help Document