Trending

World technology news

→
Spillways of Bagnell Dam in Missouri
CRAN ggsankeyfierIn-depth report

Open-source ggsankeyfier 0.1.9 adds curve and stacking controls for Sankey charts

The November 28 CRAN release offers more control over stacking and the shape of connecting bands in ggplot2-based flow charts.

·CRAN ggsankeyfier
Reading progress0%

A release for shaping connections in Sankey charts

Version 0.1.9 of ggsankeyfier reached CRAN on November 28. The R package draws Sankey charts with ggplot2, and the independent CRANberries archive records the changes from 0.1.8. The update adds curve_weight for geom_sankeyedge and extends control over stacking. The width of a Sankey band can represent an amount moving between stages. Its curvature and position affect how easily a reader follows it. The new settings make those layout decisions available without requiring a change to the underlying quantity.

Move the turning point of a band

The reference manual puts the default curve weight at 0.5, halfway between the connected nodes. Values near zero pull the curve’s inflection point towards the outgoing node. Values near one pull it towards the incoming node. Compare three renderings with the same widths and endpoints to see what changes. Moving the curve can help two close bands separate where there is space, or it can make the chart harder to read in a crowded area. The parameter describes the geometry of the connection. The weight represented by band width remains a separate data value.

Make stacking policy explicit

When several links enter or leave one node, their vertical order affects which paths are easiest to trace. The reference lists options including ascending, descending and preserving input order. A recurring report may need to keep categories in a business order each year. Another chart may place larger flows before smaller ones. Check how the same graphic responds if a data import changes the original row order. Saving the policy with the chart makes the difference understandable if the graphic is regenerated after an upgrade.

Try a fixture with known totals

Imagine a dam with water directed through three outlets. Use a small, invented set of amounts with a known total and keep those values fixed while adjusting the drawing. Verify the arithmetic in a table before interpreting the paths. The archive photograph illustrates the idea of separate outlets. It provides no measurements for the fixture. A similar check works for applications moving into outcome categories or for energy flowing between stages. Use labels and units so another reader can tell which part of the picture represents data.

Save the rendering conditions

The release notes also describe documentation and test coverage changes. A practical update check can render the same input at the dimensions used in a report, presentation and web page. Look for overlapping labels, indistinct adjacent bands and surprises caused by a changed palette. Record the package version, scale and output size alongside the settings for curve and stack order. A known example with verified totals provides a reference for the numerical side. The exported chart then provides a reference for the layout side.

Archive photo · Unifadenfisch / Wikimedia Commons ↗ · CC BY-SA 4.0 · A 2021 archive photo of Bagnell Dam illustrating flows through separate outlets. Resized for WebP.

Sources and verification
Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

How would you measure this development's real-world impact?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.