d3_sunburst_trelliscope.Rd
Create trelliscopes with D3 Sunbrust Charts
d3_sunburst_trelliscope(
data,
data_cognostics = NULL,
return_raw_data = F,
conditional_cols = NULL,
grouping_variables = NULL,
aggregator = "sum",
data_column_name = NULL,
index_columns = NULL,
size = NULL,
filter_parameters = NULL,
remove_columns = NULL,
id_columns = NULL,
password = NULL,
input_cognostics = NULL,
view_parameters = NULL,
trelliscope_path = NULL,
trelliscope_title = NULL,
sort_columns = NULL,
sort_level = "desc",
self_contained = T,
width = 650,
height = 500,
rows = 1,
columns = 2,
description = "",
push_to_github = F,
use_trelliscope2 = F,
use_jsonp = T,
markdown_description = "",
generate_thumbnail = F,
trelliscope_group = "common",
require_token = F,
trelliscope_id = NULL,
split_sig = NULL,
order = 1,
use_auto_cognostics = F,
disclaimer = F,
include_nesting = F,
glue_title = NULL,
glue_subtitle = NULL,
size_filter = NULL,
show_labels = T,
exclude_filtered_words = F,
exclude_filters = NULL,
algorithm = "pivotSize",
color = NULL,
color_type = "continuous",
color_palette = NULL,
use_base_color_group = T,
override_colors = F,
color_direction = 1,
type = "index",
font_size = 8,
file_path = NULL,
draw = F,
use_breadcrumb = T,
bread_tooltip = NULL,
bread_at = NULL,
bread_follow_mouse = T,
bread_my = NULL,
bread_html = JS("function(nodedata, size, percent) { return '<span style=\"font-weight: bold; font-family: serif; word-break: break-word; font-size: 8px\">' + nodedata.name + '</span>' + '' + (size/1000000).toFixed(3)}"),
orient = "left",
widget_name = "my-sunburst",
use_extra_css = T,
extra_css = NULL,
value_css = glue("font-size: {font_size}px; max-width: 100px;") %>% as.character(),
percent_css = "margin-left: 12px;",
frame_css = "\n overflow: hidden;\n ",
content_css = "\n text-overflow: ellipsis;\n font-size: 7x;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n font-kerning: auto;\n kerning: auto;\n ",
label_css = "\n font-size: 7px;\n text-overflow: ellipsis;\n ",
chart_advanced_css = "\n width: 100%;\n height: 100%;\n align-content: center;\n\n ",
frame_widget = F,
frame_width = "100%",
frame_height = NULL,
frame_element = NULL,
frame_options = frameOptions(allowfullscreen = T),
sb_width = 800,
sb_height = 600,
add_id_column = T,
remove_data_columns = T
)
library(tidyverse)
library(asbviz)
gapminder::gapminder %>%
d3_sunburst_trelliscope(
grouping_variables = "year",
index_columns = c("continent", "country"),
size = "pop")
gapminder::gapminder %>%
tbl_nest(grouping_variables = "year",
data_column_name = "ttdata") %>%
d3_sunburst_trelliscope(
id_columns = "year",
data_column_name = "ttdata",
index_columns = c("continent", "country"),
size = "pop"
)
gapminder::gapminder %>%
d3_sunburst_trelliscope(
index_columns = c("year", "country"),
grouping_variables = c("continent"),
password = "owen_theo",
size = "pop")
tbl_cog <- gapminder::gapminder %>% build_cognostics()
tbl_cog <- asbtools::tbl_edit(tbl_cog)
data = gapminder::gapminder
data %>% d3_sunburst_trelliscope( index_columns = c("year", "country"), data_cognostics = tbl_cog, grouping_variables = c("continent"), password = "owen_theo", size = "pop" )