r2d3 (version 1.0)

D3Tree: D3 Tree

Description

Creates a html file containing json file and a D3.js Tree Map. The nested json needs values assigned to it in order for it to work

Usage

D3Tree(JSON, file_out)

Arguments

JSON
A json object
the
location and name for the output html file

References

Mike Bostock's lovely d3: http://d3js.org/

Examples

Run this code
data(counties)
JSON<-jsonNestedData(structure=counties[,1:3], values=counties[,4], top_label="UK")
D3Tree(JSON, file_out="Tree.html")

Run the code above in your browser using DataCamp Workspace