Creating metrics using calculated columns
Probably the most fundamental and useful data manipulation tool provided by Spotfire is the ability to create calculated columns in imported data tables. A calculated column is created by writing an expression that references other columns in the table, documents property values, and values that you supply, or hard code. The expression can be a simple piece of arithmetic, such as dividing one column by another to get a proportion, or a more complex piece of conditional logic. Once created, a calculated column can be used exactly like any other column.
Basic metric
Let's work through an example by looking at two key metrics of batting performance in baseball: the on base percentage (OBP), which is essentially how often a batter reaches base, and the walk-to-strikeout ratio (BB/K), which is a measure of a hitter's plate discipline.
The data we will use here is BaseballPlayerData.xls
, which you can download from http://www.insidespotfire.com.
Create a new...