TIBCO Spotfire:A Comprehensive Primer(Second Edition)
上QQ阅读APP看书,第一时间看更新

Exploring key data types

Another key data concept that is important to mention at this point is that of data types. This concept is equally important in spreadsheets, it's just that spreadsheets don't generally force you to declare the data type, and they allow you to mix and match data types in individual columns. In data tables, each column must have a single data type for all values in all rows.

So, what is meant by data type? There are (in essence) five types of data:

  • Numbers
  • Text
  • Dates/times
  • Boolean
  • Binary

They are defined as such because they have distinct properties. Numbers can be used in calculations, and the vast array of mathematical functions and operators can be brought to bear on them. Text can be parsed, concatenated, counted, and arranged into categorical hierarchies. Dates have special meanings and can be used in time calculations and hierarchies (year->month->day, for example). Boolean values are one of either true or false. Binary data is machine-readable. Examples of binary data are images such as JPEG or PNG files, or map geometries.

However, life is never simple, and there are several subtypes of the five data categories and a few other special data types that you need to understand.

Spotfire uses 12 data types, and all data columns that are imported into Spotfire must be put into one of these type categories, unlike in Excel. The data in Spotfire is strongly typed. Strongly typing the data forces it to be structured by type and is much more robust for analysis than weakly typed data (as in Excel). The following table describes the data types you will use the most: