README.md

d3treeR

d3treeR is an R htmlwidget for d3.js treemaps. It is designed to integrate seamlessly with the R treemap package or work with traditional nested JSON hierarchies.

Please see the Building Widgets post Week 29 | d3treeR v2 for a discussion.

Quick Examples

Using treemap

library(treemap)
library(d3treeR)

# example 1 from ?treemap
data(GNI2010)
d3tree2(
   treemap(
     GNI2010
     ,index=c("continent", "iso3")
     ,vSize="population"
     ,vColor="GNI"
     ,type="value"
   )
   , rootname = "World"
)

Using JSON

library(d3treeR)
d3tree2(
  "http://bl.ocks.org/mbostock/raw/1093025/flare.json"
  , celltext = "name"
)


timelyportfolio/d3treeR documentation built on May 31, 2019, 1:49 p.m.