library(rcdimple)
library(magrittr)
library(tidyr)
VADeaths %>%
# make it a data.frame
{data.frame( age_grp = rownames(VADeaths), . )} %>%
# make it long form
gather( demographic, death_rate, -age_grp ) %>%
dimple(
x = "death_rate"
, y = c( "demographic", "age_grp" )
, groups = c( "age_grp" )
, type = "bubble"
) %>%
xAxis( type = "addMeasureAxis" ) %>%
yAxis( type = "addCategoryAxis" ) %>%
add_legend() %>%
set_bounds( x= "15%", y = "10%", width = "80%", height = "85%" )