Treemap with multiple levels

I'm trying to make a treemap with many subgroups in ggplot2. I found this treemap https://datavizcatalogue.com/methods/treemap.html but they dont show how to do with it with R ?

The treemapify package does this