ただパッケージ動かしてみたっていうだけなんですけど。
インストール方法は GitHub - wilkox/treemapify: 🌳 ggplot2 geoms for drawing treemapsに従ってください。
ggplot の記法が使えて、facet とかできる点がいいと思いました。
#library(devtools)#install_github("wilkox/ggfittext")#install_github("wilkox/treemapify")library(googleAnalyticsR)library(treemapify) ga_auth() account_list <- ga_account_list() ga_id <- account_list[3,'viewId'] gadata2 <- google_analytics_4(ga_id, date_range = c("2017-04-01","2017-04-30"), metrics = c("sessions","goal3Completions"), dimensions = c("userType","medium","source"), order = order_type(c("sessions"), sort_order ="DESC", orderType ="VALUE"), max =20000) ggplot(gadata2, aes(subgroup = medium, area = sessions, fill = goal3Completions/sessions))+ geom_treemap()+ geom_treemap_subgroup_border()+ geom_treemap_subgroup_text(alpha=0.5,place ="centre")+ geom_treemap_text(aes(label=source),place ="bottomright")+ scale_fill_continuous(low="white",high="forestgreen")+ guides(fill=guide_legend(title="CVR"))+ facet_wrap(~userType,nrow=2)