What is the difference between heat map and treemap?

A heat map is a useful tool for comparing groups based on their color and size. We can compare two distinct measurements in this way. A treemap is a very powerful visualization, particularly used for illustrating hierarchical (tree-structured) data and for visualizing a part of or a whole relationship.