Uploaded October 2014 | Updated September 2026, 32 minutes ago
A tutorial on how to build a treemap graph in R and refining it using Illustrator, utilizing a dataset used in an article by The New York Times on Feb. 25, 2007: nytimes.com/2007/02/25/business/yourmoney/25chrysler.html
Treemap visualization by Amanda Cox. Although described in Chapter 5 of the book Visualize This by Nathan Yau, this tutorial used a different package (treemap with RColorBrewer) instead of "portfolio". The PDF of the tutorial with the related links and files can be found here: static.trogu.com/documents/classes/523/2022/treemap_key/updated_2022-04-18_step_by_step_demo_treemap_legend_key.pdf
Disclaimer: I am not a programmer and my descriptions and terminology are probably off here and there. The viewer is encouraged to consult the original book and other sources on R on the web. In the example I replicate a detail from the original NY Times treemap: archive.nytimes.com/www.nytimes.com/imagepages/2007/02/25/business/20070225_CHRYSLER_GRAPHIC.html
Complete with key (100K and 25K rectangles) and color scale (diverging color ramp). Many thanks to Amanda Cox, graphics editor at the NY Times, for the suggestion to use "bucket" to customize the color ramp. The key with the rectangles was built with a separate scrap file.
A tutorial on how to build a treemap graph in R and refining it using Illustrator, utilizing a dataset used in an article by The New York Times on Feb. 25, 2007: nytimes.com/2007/02/25/business/yourmoney/25chrysler.html
Treemap visualization by Amanda Cox. Although described in Chapter 5 of the book Visualize This by Nathan Yau, this tutorial used a different package (treemap with RColorBrewer) instead of "portfolio". The PDF of the tutorial with the related links and files can be found here: static.trogu.com/documents/classes/523/2022/treemap_key/updated_2022-04-18_step_by_step_demo_treemap_legend_key.pdf
Disclaimer: I am not a programmer and my descriptions and terminology are probably off here and there. The viewer is encouraged to consult the original book and other sources on R on the web. In the example I replicate a detail from the original NY Times treemap: archive.nytimes.com/www.nytimes.com/imagepages/2007/02/25/business/20070225_CHRYSLER_GRAPHIC.html
Complete with key (100K and 25K rectangles) and color scale (diverging color ramp). Many thanks to Amanda Cox, graphics editor at the NY Times, for the suggestion to use "bucket" to customize the color ramp. The key with the rectangles was built with a separate scrap file.










