Streamgraph package now supports continuous x axis scale

A post on [StackOverflow]( asked about using a continuous variable for the x-axis (vs dates) in my [streamgraph package]( While I provided a workaround for the question, it helped me bump up the priority for adding support for continuous x axis scales. With the [DBIR]( halfway behind me now, I kicked out a new rev of the package/widget that has support for continuous scales.

Using the data from the SO post, you can see there’s not much difference in how you use continuous vs date scales:

dat <- read.table(text="week variable value
40     rev1  372.096
40     rev2  506.880
40     rev3 1411.200
40     rev4  198.528
40     rev5   60.800
43     rev1  342.912
43     rev2  501.120
43     rev3  132.352
43     rev4  267.712
43     rev5   82.368
44     rev1  357.504
44     rev2  466.560", header=TRUE)
dat %>% 
  streamgraph("variable","value","week", scale="continuous") %>% 

Product Revenue

I’ll be adding support for using a categorical variable on the x axis soon. Once that’s done, it’ll be time to do the CRAN dance.

Cover image from Data-Driven Security
Amazon Author Page

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.