Within a specific Data Unit (which means, implicitly, within a specific Exposure Entity and occupancy case), a building class is defined by the combination of three fields from the ESRM20 model:
- "taxonomy" (the string describing the structural type)
- "settlement_type" (e.g. rural, urban, etc)
- "occupancy_type" (not the same as occupancy case, it provides details)
The first field will always be available. The last two can be "ALL" either because explicitly stated in ESRM20 (or any other input aggregated exposure model) or because we fill it in as "ALL" if the field (the level of detail) does not exist.
It does occur that the same combination of "taxonomy", "settlement_type" and "occupancy_type" is named in more than one row of the input aggregated exposure model within the same Data Unit. This has to do with the way the original aggregated models were created. This code groups these rows and adds their contributions to the proportions of building classes, as they are, indeed, the same building class.