Description Usage Arguments Examples
Circle packing visualizations provide an interactive way of exploring hierarchical data that contains elements of different sizes or magnitudes
1 2 |
data |
data in the form of a hierarchical list or a nested d3 JSON hierarchy |
size |
string representing the name of the size variable. |
color_min |
string representing the minimum value of the color range for the
circles. The string can be either a hexadecimal, RGB, or HSL color.
|
color_max |
string representing the maximum value of the color range for the
circles. The string can be either a hexadecimal, RGB, or HSL color.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | library(circlepackeR)
# using json
circlepackeR( "http://bl.ocks.org/mbostock/raw/7607535/flare.json" )
# using data.tree
## Not run:
library(data.tree)
data(acme)
circlepackeR(acme, size = "cost" )
## End(Not run)
# using a data frame with data.tree
## Not run:
library(data.tree)
library(treemap)
data(GNI2010)
GNI2010$pathString <- paste("world",
GNI2010$continent,
GNI2010$country,
sep = "/")
population <- as.Node(GNI2010)
circlepackeR(population, size = "population" )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.