Title: | Create Dependency Wheels and Sankey Diagrams |
---|---|
Description: | By binding R functions and the 'Highcharts' <http://www.highcharts.com/> charting library, 'sankeywheel' package provides a simple way to draw dependency wheels and sankey diagrams. |
Authors: | Zhenxing Cheng [aut, cre], Qiongqiong Li [aut, ctb] |
Maintainer: | Zhenxing Cheng <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-03 04:20:42 UTC |
Source: | https://github.com/cran/sankeywheel |
Data Source: https://www.highcharts.com/demo/sankey-diagram
sankeydf
sankeydf
A tibble data frame with 46 rows and 3 variables.
@description By binding R functions and the 'Highcharts' http://www.highcharts.com/ charting library, 'sankeywheel' package provides a simple way to draw dependency wheels and sankey diagrams.
sankeywheel(from, to, weight, type = "dependencywheel", width = NULL, height = NULL, seriesName = "demo series", theme = "sandsignika", title = "Example Chart", titleAlign = "center", titleSize = "20px", titleColor = "#333333", subtitle = "", subtitleAlign = "center", subtitleSize = "", subtitleColor = "#666666", elementId = NULL, ...)
sankeywheel(from, to, weight, type = "dependencywheel", width = NULL, height = NULL, seriesName = "demo series", theme = "sandsignika", title = "Example Chart", titleAlign = "center", titleSize = "20px", titleColor = "#333333", subtitle = "", subtitleAlign = "center", subtitleSize = "", subtitleColor = "#666666", elementId = NULL, ...)
from |
from verctor; |
to |
to vector; |
weight |
weight vector; |
type |
Charts type, dependencywheel or sankey; |
width |
chart width, for example, "100%"; |
height |
chart height, for example, "400px"; |
seriesName |
Series name, like "demo series"; |
theme |
chart theme, you can use these themes: darkgreen/darkblue/avocado/darkunica/gray/ gridlight/grid/sandsignika/sunset; |
title |
title; |
titleAlign |
title alignment, left/center/right; |
titleSize |
title size, like "20px"; |
titleColor |
title color, like "#333333"; |
subtitle |
subtitle; |
subtitleAlign |
subtitle alignment, left/center/right; |
subtitleSize |
subtitle size, like "16px"; |
subtitleColor |
subtitle color, like "#666666"; |
elementId |
NULL. |
... |
Additional parameters. |
library(sankeywheel) if(interactive()){ sankeywheel(from = sankeydf$from, to = sankeydf$to, weight = sankeydf$weight, type = "dependencywheel") sankeywheel(from = sankeydf$from, to = sankeydf$to, weight = sankeydf$weight, type = "sankey", theme = "sunset") }
library(sankeywheel) if(interactive()){ sankeywheel(from = sankeydf$from, to = sankeydf$to, weight = sankeydf$weight, type = "dependencywheel") sankeywheel(from = sankeydf$from, to = sankeydf$to, weight = sankeydf$weight, type = "sankey", theme = "sunset") }
Output and render functions for using sankeywheel within Shiny applications and interactive Rmd documents.
sankeywheelOutput(outputId, width = "100%", height = "400px") renderSankeywheel(expr, env = parent.frame(), quoted = FALSE)
sankeywheelOutput(outputId, width = "100%", height = "400px") renderSankeywheel(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a sankeywheel |
env |
The environment in which to evaluate |
quoted |
Is |