equiparate is an R package for comparing the density of buildings and spaces. It can also be utilised to compare the adaptability of built space. Building on the work of Martin and March and Terzidis, it utilises permutations and abstracts space using heatmaps. It can be installed via Github.

library(equiparate)

# Visualise heatmaps with an equal number of units
equal_units(nrow = 4, ncol = 3, units = 4)
Floorplans with an equal number of units using equiparate.