Skip to content

Data transformations (mapping)

FastStats supports various transformation mappings that convert the data on input.

Mappings are often used for selector variables to convert the data to match the format of the Decodes.

The mapping is chosen from the pop-up on the expanded variable edit.

The map size is specified for First N, Array → Bits and Date→Age conversions. Otherwise it defaults to the code size.

The following mappings are available (follow links for full description):

Bandings

String manipulation

String Manipulation

  • Right justified zero pad
  • Right justified blank pad
  • Left justified blank pad
  • First n characters
  • Uppercase
  • Lowercase
  • Propercase
  • Toascii strip top bit
  • Replace control characters with space
  • Starts with (see below for an explanation)
  • Tps and remove spaces

UK postcode

UK Postcode Manipulation

  • UK postcode to aa
  • UK postcode to aadd
  • UK postcode to aaddl
  • UK postcode to aaddls
  • UK postal district to aaddl
  • UK postal district to aadd

Date manipulation (legacy)

We do not recommend using 2 digit years - these mappings use 2 digit years and are provided only for compatibility with legacy source data. Wherever possible ensure that source data includes 4 digit years to avoid century confusion.

  • dd.mm.yy to yymmdd
  • mm.dd.yy to yymmdd
  • dd.mmm.yy to yymmdd
  • mmm.dd.yy to yymmdd
  • yy.ddd to yymmdd

Days and months

  • mm.yy to yymm
  • mm.yyyy to yyyymm
  • dd.mm to mmdd

We advise that all dates use 4 digit years to ensure standard date compliance.

Starts with

The Starts With mapping works in the following way:

It matches incoming data that starts with one of the decodes. Given the following decodes list:

  • 01926
  • 0192
  • 0123

The following data would match:

  • 0192 matches to 0192
  • 0123 matches to 0123
  • 01926 matches to 01926 (since it is the first decode to match)
  • 01234 matches to 0123
  • 01926407565 matches to 01926
  • 01234342502 matches to 0123