# NOT RUN {
library(dplyr)
data(gapminder, package = "gapminder")
gapminder_2007 <- gapminder::gapminder %>%
filter(year == max(year)) %>%
mutate(pop_mm = round(pop / 1e6))
dout <- data_to_hierarchical(gapminder_2007, c(continent, country), pop_mm)
hchart(dout, type = "sunburst")
hchart(dout, type = "treemap")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab