A behavioural measure is a number derived from a player's transaction data. This data needs to have specific columns depending on the measure you want to calculate. For example, measures in the bet domain require the **bet_size** column. For each of the measures you plan to use, make sure that the data you have in the gamba standard format (see `check_data`

) has the correct values.

Once your data has all of the right columns, the simplest way to get started is to call the `create_measures_table`

method below, giving it one or more players bets in the gamba standard format.

**Note:**The

`create_measures_table`

method is perhaps the most useful thing in the entire library.Not all measures need the same data to be computed. The gamba library distinguishes between three primary domains (time, cost, and loss), and includes a final *other* domain to include everything else.

The time domain consists of behavioural measures that can be computed using only the knowledge of when the bets took place. This means using only values from the ** bet_time** column in the player bet dataframe.

The cost domain contains all behavioural measures which can be computed using additional values from the ** bet_size** column. As such, they describe

*spending*behaviours as opposed to

*engagement*behaviours as above.

The loss domain includes all behavioural measures which require the additional information of the size of the payout received as a result of each bet. This data should be held in the ** payout_size** column if available.

All measures not in the root, bet, or loss domains, require some additional information such as the house edge for each bet, the game being played, etc. These are currently broadly grouped into the 'other' domain' but as the library (and academic)'s capabilities grow, this domain will likely be split further.

The measures module also contains some convenience methods which accept full existing data sets of players bets and compute the collection of behavioural measures used in a given study.

This module also contains a utility function for standardising each of the measures in a measures table, aggregating bets, checking measure data, and other things. It's unlikely that you'll need to use these methods directly in your own work, but are used in some of the higher-level methods in the library.

The measures module also has a method for plotting the position of an individual in the context of the rest of the population. This is useful for exploratory work on outliers and similar things.