Description Usage Arguments Examples
Make a radviz
1 2 3 |
data |
|
draw_links |
whether to draw links or not |
zoom_factor |
gets the dimension nodes on a bigger radius than the panel, to pull nodes away from the center |
dot_radius |
radius of each dot |
use_repulsion |
special repulsion effect to spread the nodes from each others so they can be better selected |
diameter |
size of the circle (should be <= |
margin |
margin around the circular panel |
width, height |
height & width of the widget |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # motor vehicles
mtcars_1 <- dplyr::add_rownames(mtcars, var="car")
radviz(mtcars_1, diameter=600, margin=100,
use_repulsion=TRUE, draw_links=TRUE,
width=600, height=500) %>%
add_dimensions(c("mpg", "cyl", "disp", "hp", "drat", "wt",
"qsec", "vs", "am", "gear", "carb")) %>%
add_color("cyl") %>%
add_tooltip("function(d) { return d.car; }")
# motor vehicles deaths
cardeaths <- data.frame(as.matrix(Seatbelts),
year=substring(zoo::as.yearmon(time(Seatbelts)), 5, 7))
radviz(cardeaths, diameter=600, margin=100,
use_repulsion=FALSE, draw_links=FALSE,
width=600, height=500) %>%
add_dimensions(c("DriversKilled", "PetrolPrice", "VanKilled")) %>%
add_color("year") %>%
add_tooltip("function(d){ return d.year; }")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.