How to use the interactive graph / analyse tool
The interactive graph on this site uses the analyse tool to create the data. I'll describe here how to use the interactive graph - it should be fairly clear from this and the usage output of analyse how this works if you're using the tool directly
Sources
The first thing you have to do is to choose a raw data source. This site automatically checks for new data at the public websites of the various organisations listed in the credits page. So you should always have the latest and best data to hand.
The main sources to use when you're starting are:
- HADCRUT4 variance-adjusted global mean: The global temperature data from 1850 which most people start with.
- SIDC Sunspot Number (SSN): Monthly sunspot numbers since 1750.
- ESRL CO2: Mauna Loa CO2 monthly average readings since 1958.
Processing steps
After choosing your raw data source, you can then choose a number of processing steps to apply to the data to create the graph. If you don't choose any, you just get the raw data itself.
The steps can be applied in any order, and can even be repeated if you're feeling really adventurous. I've limited them to 10 for the interactive graph to stop the table getting too big, but in the analyse tool you can have as many as you like (if you really need more than 10 steps I might suggest you should be running it locally!)
Some steps take a numeric value which defines what they do - what the value does is defined below. Others don't take a value and you can just leave it blank.
1: Data selection
These are the easiest, and just select the time window you want to graph
Processing step | Value | Function | |
---|---|---|---|
From | Year | Selects data from the given year onwards | |
To | Year | Selects data up to the given year (not including it) | |
Last | Samples | Selects the last number of samples given | |
Every | Samples | Selects samples at the interval given (usually 12) |
If you want to select exact months, you have to use the decimal year, so June 1944 is 1944.42 (June = month 6, counting from 1; month 5 counting from zero; 5/12 = 0.42).
Examples:
- HADCRUT4 from 1920 to June 1944
- HADCRUT4 for the last decade (whenever you do it)
- HADCRUT4 January values
2: Data transformation
These are simple modifications of individual data values:
Processing step | Value | Function | |
---|---|---|---|
Scale | Scale factor | Multiplies each sample by the given scale factor | |
Offset | Offset amount | Adds the given offset to each sample (can be negative) | |
Normalise | - | Scales and offsets all samples so they fall into the range 0..1 | |
Detrend | End-to-end slope | Removes a slope from 0 at the first sample to the given amount at the end (can be negative) | |
Derivative | - | Take the first derivative of the data (each sample has the one before subtracted) | |
Integral | - | Integrate the data (each sample is added to the cumulative total of the one before) |
Examples:
- SIDC SSN scaled and offset (to make comparable with temperature anomaly)
- SIDC SSN normalised (an easier way to get the same effect)
- HADCRUT4 decadal average rates of change
- ESRL CO2 detrended annual mean
3: Simple averaging
The simplest way to remove short-term 'noise' from a graph is by averaging samples. Alternatively, you might be more interested in the 'noise' than the long term trend...
Processing step | Value | Function | |
---|---|---|---|
Mean | Months | Running mean over the given number of months. Keeps the number of samples the same, but smooths them by taking the average of that number of months around each sample. | |
Isolate | Months | Does the same running mean as 'mean', but then subtracts this from the raw data to leave the 'noise' | |
Compress | Months | Reduces the number of samples by averaging across the given number of months and replacing with the average. Use this to simplify a dataset before doing complex operations on it. |
Examples:
- HADCRUT4 with an 11-year (132 month) running mean
- HADCRUT4 with the 11-year (132 month) running mean removed
- HADCRUT4 compressed to annual averages
4: Trend lines
To see the overall trend in the data, you can use a best-fit trend line:
Processing step | Value | Function | |
---|---|---|---|
Linear trend | - | Produces a basic trend line using Ordinary Least Squares (OLS). The result is a graph with two points, one at each end of the time range, which represent the best-fit linear trend over that time. |
Examples:
- Trend line of HADCRUT4 over the full range
- Trend line of HADCRUT4 over the last 30 years
- HADCRUT4 data (annually smoothed) with long-term and 30-year trend lines
Note that since the graphs are auto-scaling, trend lines by themselves will always be the same shape! It's the vertical scale that matters.
5: Frequency-domain (Fourier) analysis
These are the most complex and most powerful of the processing steps. Fourier analysis works on the principle that any waveform can be decomposed into a combination of simple sine waves (here is Wikipedia's page on Fourier analysis).
Note: When using these processes keep in mind whether you are in the frequency domain or time (normal) domain, otherwise you can get some very strange results indeed!
Processing step | Value | Function | |
---|---|---|---|
Fourier | - | Converts the data into the frequency domain. The first resulting sample is the DC offset, the second the 1st harmonic, etc. Technical note: this a complex DFT of a real dataset, so the result is symmetric around N/2 | |
Inverse-Fourier | - | Converts the data back to the time domain again. Technical note: Complex IDFT, only real parts kept in output. | |
Low-Pass | Harmonic number | Removes all frequencies from the given harmonic number and above. Must be used in frequency domain. Technical note: Zeros samples from n to (N-1-n) | |
High-Pass | Harmonic number | Removes all frequencies up to the given harmonic number. Must be used in frequency domain. Technical note: Zeros samples from 0..n-1 and (N-n)..(N-1) | |
Window | - | Applies a Hann window to the data before Fourier analysis. This shapes the data so it produces a more accurate frequency spectrum, but don't rely on the shape of the output, particularly at each end.Must be used in time domain. | |
Magnitude | - | Takes the absolute magnitude of the complex Fourier transform. You must use this to display frequency spectra, otherwise the complex component will be lost. |