LatestValues Display External Data Example

From dataZoa Wiki
Jump to: navigation, search

Consider a LatestValues display that shows the three latest years of housing starts for a couple of states. In this display, each row comes from your housing starts series for that state, and each column is a yearly figure. Let's say the rows are for series named AlabamaStarts and AlaskaStarts

If you wanted add a fourth column showing the change from prior year, that's easy because that calculation is available right in the display builder. But suppose you wanted a column to show the (unrelated but relevant) state populations instead? You have the population data you need in your Workbench, but it is not any part of the display, nor should it be, really. To incorporate that data into this display, you would select External Data from the Show picklist for your new column.

When you select to Show External Data, a box opens up prompting for the name of a Grouplist. We can supply a name like HousingLV_PopColumn even though we haven't built it yet.

Now we'll save the display and go create that Grouplist and add our series AlabamaPopulation and AlaskaPopulation in just that order.

Now when you look at the display again, you will see column 4 with the population figures you wanted, applied cross-sectionally!


1) Use the compute cloud to create one single point calculated series from the raw data for each row. For example, for an average of the latest 3 points the formula would be "v1-v1+mean(extract(V1,length(V1)-2,3))" and the label might be "GDPAvg3"

2) When you have a single point series for each row, put them all into a GroupList and order them to match the order of the display. Give it a name like "MyAvg3"

3) In the Latest Values display, add a column and set its "Show" field to "External Data" and supply the name of your new GroupList.