---
title: "categorical-contingency"
slug: "categorical-contingency-parser"
updated: 2022-07-27T23:37:19Z
published: 2022-07-27T23:37:19Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://code.tag.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# categorical-contingency

The `categorical-contingency` **parser** will load data from two or more columns in a source data table and concatenate their values into multiple categorical **variables** within multiple categorical **collections**.

```
{
  "parser_type": "categorical-contingency",
  "table_alias": "tata",
  "column": "ccc1",
  "contingency": "ccc2",
  "contingency_as_collection": true,
  "contingency_as_variable": true
}
```

There are a number of variants for the `categorical-contingency` **parser**.

The basic form is to produce **collections** named: ***column name* | *contingency column name* = *contingency value***, and **variables** named: ***column value***.

However, by setting attribute flags such as `contingency_as_collection`, `contingency_as_variable`, and `single_collection`, the resulting **collection** and **variable** names can be adjusted for various purposes.

## contingency

**usage: *required*** A different column that will have its name and value combined with the column name to produce collection names with the pattern: **column name | contingency name = contingency value**.

## contingency_as_collection

**usage: *optional*** When set to true, only the contingency column value will be used to create the collection name.

## contingency_as_variable

**usage: *optional*** When set to `true`, the column value will produce the collection name and the contingency value will produce the variable name.

## single_collection

**usage: *optional*** When set to `true`, there will only be one collection created, named **column name | contingency column name**, and created variables will be named **column value | contingency column value**.
