This tool can be used to perform a cross-tabulation on two input raster images (`i1` and `i2`) containing categorical data, i.e. classes. It will output a contingency table in HTML format (`output`). A contingency table, also known as a cross tabulation or crosstab, is a type of table that displays the multivariate frequency distribution of the variables. These tables provide a basic picture of the interrelation between two categorical variables and can help find interactions between them. cross_tabulation can provide useful information about the nature of land-use/land-cover (LULC) changes between two dates of classified multi-spectral satellite imagery. For example, the extent of urban expansion could be described using the information about the extent of pixels in an 'urban' class in Date 2 that were previously assigned to other classes (e.g. agricultural LULC categories) in the Date 1 imagery.

Both input images must share the same grid, as the analysis requires a comparison of a pair of images on a cell-by-cell basis. If a grid cell contains a NoData value in either of the input images, the cell will be excluded from the analysis.

## Function Signature

`def cross_tabulation(self, raster1: Raster, raster2: Raster, output_html_file: str) -> None: ...`

## Project Links

WbW Homepage User Manual Support WbW