Skip to content

Commit e2ffddf

Browse files
Merge pull request #29 from pepijn-devries/work-in-progress
Fancier README
2 parents acedd67 + f6d328a commit e2ffddf

File tree

4 files changed

+46
-8
lines changed

4 files changed

+46
-8
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ggsankeyfier
22
Type: Package
33
Title: Create Sankey and Alluvial Diagrams Using 'ggplot2'
4-
Version: 0.1.8.0013
4+
Version: 0.1.8.0014
55
Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre", "dtc"),
66
email = "pepijn.devries@outlook.com",
77
comment = c(ORCID = "0000-0002-7961-6646")),
@@ -37,6 +37,7 @@ Imports:
3737
tidyr,
3838
vwline
3939
Suggests:
40+
gganimate,
4041
knitr,
4142
ragg,
4243
rmarkdown,

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ggsankeyfier v0.1.8.0013
1+
ggsankeyfier v0.1.8.0014
22
-------------
33

44
* Added better stacking order features

README.Rmd

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ data("ecosystem_services")
1616
theme_set(theme_light())
1717
```
1818

19-
> `ggsankeyfier` Go with the data flow
19+
# ggsankeyfier <a href="https://pepijn-devries.github.io/ggsankeyfier/"><img src="man/figures/logo.svg" align="right" height="139" alt="ggsankeyfier website" /></a>
20+
> Go with the data flow
2021
2122
## Overview
2223

@@ -29,8 +30,6 @@ theme_set(theme_light())
2930
[![codecov](https://codecov.io/gh/pepijn-devries/ggsankeyfier/graph/badge.svg?token=2AK9YA9UXR)](https://codecov.io/gh/pepijn-devries/ggsankeyfier)
3031
<!-- badges: end -->
3132

32-
<img src="man/figures/logo.png" align="right" alt = "logo" />
33-
3433
The `ggsankeyfier` packages allows you to visualise your data as Sankey or Alluvial diagrams.
3534
A Sankey diagram is essentially a stacked bar plot, where the bands connect bars across
3635
stages (on the x-axis), to show how quantities flow between them.
@@ -44,6 +43,21 @@ to add all sorts of other layers, such as text and labels.
4443
Furthermore, the data model used by the package allows you to visualise flows that skip stages
4544
or even feedback loops.
4645

46+
And last but not least, in contrast to other packages, `ggsankeyfier` uses proportionate bands.
47+
In alluvial and Sankey diagrams data quantity flows are represented by
48+
bands that flow across stages. In order to effectively visualise quantities, the width of the
49+
band needs to be proportionate to the quantity. Other packages use a vertically oriented
50+
brush to plot the bands, making them narrow when the slope is steep. The `ggsankeyfier` package
51+
uses a brush that is perpendicular to the direction of the flow. This keeps the width along
52+
the band constant and proportionate with its representing quantity.
53+
54+
This is illustrated in the animation below where both panels visualise the same quantity.
55+
As a reference a horizontal band representing the same quantity is shown. Note that the
56+
orientation of the brush affects its appearance.
57+
58+
![Effectively visualising data flows requires a brush perpendicular to its path](https://raw.githubusercontent.com/pepijn-devries/ggsankeyfier/refs/heads/master/data-raw/brushangle.gif)
59+
60+
4761
## Installation
4862

4963
> Get CRAN version

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
> `ggsankeyfier` Go with the data flow
2+
# ggsankeyfier <a href="https://pepijn-devries.github.io/ggsankeyfier/"><img src="man/figures/logo.svg" align="right" height="139" alt="ggsankeyfier website" /></a>
3+
4+
> Go with the data flow
35
46
## Overview
57

@@ -15,8 +17,6 @@ badge](https://pepijn-devries.r-universe.dev/badges/ggsankeyfier)](https://pepij
1517
[![codecov](https://codecov.io/gh/pepijn-devries/ggsankeyfier/graph/badge.svg?token=2AK9YA9UXR)](https://codecov.io/gh/pepijn-devries/ggsankeyfier)
1618
<!-- badges: end -->
1719

18-
<img src="man/figures/logo.png" align="right" alt = "logo" />
19-
2020
The `ggsankeyfier` packages allows you to visualise your data as Sankey
2121
or Alluvial diagrams. A Sankey diagram is essentially a stacked bar
2222
plot, where the bands connect bars across stages (on the x-axis), to
@@ -32,6 +32,29 @@ and labels.
3232
Furthermore, the data model used by the package allows you to visualise
3333
flows that skip stages or even feedback loops.
3434

35+
And last but not least, in contrast to other packages, `ggsankeyfier`
36+
uses proportionate bands. In alluvial and Sankey diagrams data quantity
37+
flows are represented by bands that flow across stages. In order to
38+
effectively visualise quantities, the width of the band needs to be
39+
proportionate to the quantity. Other packages use a vertically oriented
40+
brush to plot the bands, making them narrow when the slope is steep. The
41+
`ggsankeyfier` package uses a brush that is perpendicular to the
42+
direction of the flow. This keeps the width along the band constant and
43+
proportionate with its representing quantity.
44+
45+
This is illustrated in the animation below where both panels visualise
46+
the same quantity. As a reference a horizontal band representing the
47+
same quantity is shown. Note that the orientation of the brush affects
48+
its appearance.
49+
50+
<figure>
51+
<img
52+
src="https://raw.githubusercontent.com/pepijn-devries/ggsankeyfier/refs/heads/master/data-raw/brushangle.gif"
53+
alt="Effectively visualising data flows requires a brush perpendicular to its path" />
54+
<figcaption aria-hidden="true">Effectively visualising data flows
55+
requires a brush perpendicular to its path</figcaption>
56+
</figure>
57+
3558
## Installation
3659

3760
> Get CRAN version

0 commit comments

Comments
 (0)