circlepackeR: htmlwidget for d3.js zoomable circle packing visualizations

Description Usage Arguments Examples

Description

Circle packing visualizations provide an interactive way of exploring hierarchical data that contains elements of different sizes or magnitudes

Usage

1
2
circlepackeR(data, size = "size", color_min = "hsl(152,80%,80%)",
  color_max = "hsl(228,30%,40%)", width = NULL, height = NULL)

Arguments

data

data in the form of a hierarchical list or a nested d3 JSON hierarchy

size

string representing the name of the size variable. "size" is the default.

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. "hsl(152,80%,80%)" is the default.

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. "hsl(228,30%,40%)" is the default.

Examples

 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)

sebabauer/mapaecosistema documentation built on May 29, 2019, 4:56 p.m.