Worksheet – Case #4 – Calculating the mean of a series for several time periods

Finding Data

To find the time series used in this example we will access the tree by Country & Region as most global commodity spot prices can be found under the region World.

Go to:

Country & Region > World > Commodities & Energy > Spot Prices > Energy > Crude Oil.

Locate and add:

  • World, Crude Oil, Brent, Spot, FOB North Sea, ICE, Close, USD

You can also use the short code by simply writing “oil” in the expression box in “Series list”.

Data Preparation

Changing frequency

The oil price is originally a daily series. In the chart displayed, we decided to use a monthly frequency to make the chart easier to read. To do so:

  • Select “Series list” in the tree
  • Click on the drop-down “Frequency” setting
  • Change the frequency from “Highest (daily)” to “Monthly”

To control how the frequency conversion is done, you can:

  • Go to the “Conversion settings” tab
  • Select the method of your choice under “to Lower frequency conversion method”

Analysis

Statistics

If you wish to calculate the mean of a specific series, you should use the Statistics analysis.

  • Select “Time chart” in the tree
  • Click on “Insert” and choose Statistics
  • In the Statistics Analysis, click on the “Add” button and select "Mean” as calculation.

Now, add four mean-calculations to the document. The date ranges used are:

From To
1986 2004
2005 2009
2010 2013
2014

Note! To limit the graph lines to the period over which the mean is calculated you must uncheck the Extrapolate tick-box for each calculation.

Charting

Adding value labels

In this case, we’ve added observation labels for each mean, displaying the value and the period. You can create them manually one by one, but you can also automate the process, using dynamic properties.

First, create one observation label, which will be used later a default.

  • In “Time chart”, select “Chart annotations” at the top
  • Select Observation label under “Annotations”
  • Click on one of the mean-lines in the graph to add the observation label to it.

Next step is to edit the text. To automate the process, you should:

  • Click once on the observation label
  • Look up to Presentation Properties > Text > and click on “Edit Default”

You should write a text structured as: [analysis]: [value]$. In the new window, you should use dynamic properties:

  • Delete the current text
  • Go to the dynamic properties' menu on the right side
  • Add “Analysis Description” from the branch “current”
  • Add then “value” from the branch “current”, and add the sign $ at the end.

This is how the expression will look like: {s .AnalysesDescription}: {s .Value} $

You can now close the window. Your next step is to duplicate this observation label for the other mean series.

You can simply use a copy/paste function:

  • Right click on the observation label you just created, and select “copy”
  • Right click on another mean series, and select paste
  • Repeat the process for each mean series.

Other changes

  • The title has been edited
  • The legend has been removed