News combit Dev Blog

Use Rscript Visualizations for Your Reports

Posted: Thursday, October 11, 2018 | 0 comment(s)
While List & Label's charts offer a lot of visualization types and are extended almost every version, there are way too many visualization types to support them all. Thus, requests for new chart visualizations keep bubbling up in our feedback portal. On the other hand, Rscript is a well established language specialized for statistical computing and graphics that supports any visualization I can think of. So it absolutely makes sense to add Rscript output to the available chart visualization and include the best of both worlds - List & Label's versatility for report layout and data access and Rscript's deluge of visualization types. And that's just what we did for the Enterprise Edition of List & Label 24.

If you add a new chart, you can now choose "Rscript" as chart type:

The Rscript chart dialog offers a huge code editing control where you can write your Rscript. It also has a nifty integration for RStudio or your favorite Rscript code editor - the code can freely be swapped between LL and RStudio. Last, but not least, you can preview the result of your script at any time. Let's do a quick walkthrough.

On the "Data Source" tab you can choose the available data for your script. For this example lets choose a suitable data source for a Ridgeline Plot. This visualization type allows to compare the values of multiple categories e.g. by time. The result is similar to Google's "Popular Times" chart. Here's what it looks like for my favorite Irish Pub here in Constance:

However, a Ridgeline Plot typically uses a continuous envelope line and compares different locations underneath each other. A good starting point is a google search for a suitable script - there are gazillions of Rscripts out there. In this case I found a template on GitHub here, thanks @hnrklndbrg for sharing this great repro of visualizations.

The raw data for the plot looks like this:

where the first column is the activity, the second is the number of minutes since midnight and the third is a measure for the number of visits in some obscure metric. You can easily make the data available to the Rscript chart by adding the fields to a new dataset - there's even a custom wizard to make life easier.

For developing and debugging advanced scripts it's highly recommended to install RStudio. After copying the script to the code window, click on the "Edit" button to open it in RStudio. Note the automatically generated code for accessing the data:

Don't mess with this part of the code or things will badly break ;). If you run the line that populates the dataset you can see that your data safely arrived on the other side:

List & Label automatically converts the data to a CSV file that is created behind the scenes and passed to the Rscript. The rest is an easy exercise - just replace the data source from the GitHub sample script with our actual data. We'll ship this example with version 24 if you want to see for yourself. After saving the edited script in Rstudio and returning to the Designer, you're asked if you want to accept the external changes:

You really, really will want to do this most of the time. Click the preview button to get an impression of the new Ridgeline chart:

Of course, this visualization type can now float freely within your more complex dashboard report:

We ship a demo project for this feature that shows how to create a Tag Cloud, a Waterfall Plot, a Ridgeline and a Surface Plot, all of which were previously unsupported in List & Label.

While you admittedly have to be a bit tech savvy in order to make use of this new feature, it's the ultimate answer to any missing chart visualizations. I'm really proud of this new, deep integration and look forward very much to seeing what you'll end up using it for.

Author: Jochen Bartlau
Head of Development List & Label

Jochen Bartlau leads the development at combit as Managing Director. He's a Microsoft .NET enthusiast driving innovation & agile project management. The mobile devices geek who used to be a physicist in his first life loves to spend his spare time with his family.


combit Development BlogRSS
What’s this blog for?
A place to share updates about the ongoing development of our products. General musings on the software industry included.
April 2021 (1)
March 2021 (1)
February 2021 (2)
January 2021 (1)
December 2020 (2)
November 2020 (1)
October 2020 (2)
September 2020 (1)
August 2020 (2)
July 2020 (1)
June 2020 (1)
May 2020 (2)
April 2020 (2)
March 2020 (2)
February 2020 (1)
January 2020 (1)
December 2019 (1)
November 2019 (2)
October 2019 (2)
September 2019 (2)
August 2019 (2)
July 2019 (2)
June 2019 (2)
May 2019 (1)
April 2019 (0)
April 2019 (1)
March 2019 (1)
February 2019 (1)
January 2019 (1)
December 2018 (1)
November 2018 (2)
October 2018 (4)
September 2018 (4)
August 2018 (2)
July 2018 (2)
June 2018 (2)
May 2018 (1)
April 2018 (1)
March 2018 (1)
February 2018 (2)
January 2018 (1)
December 2017 (1)
November 2017 (2)
October 2017 (3)
September 2017 (3)
August 2017 (2)
July 2017 (2)
June 2017 (1)
May 2017 (2)
April 2017 (1)
March 2017 (1)
February 2017 (1)
January 2017 (2)
December 2016 (1)
November 2016 (1)
October 2016 (4)
September 2016 (5)
August 2016 (2)
July 2016 (2)
June 2016 (3)
May 2016 (2)
April 2016 (3)
March 2016 (3)
February 2016 (1)
January 2016 (2)
December 2015 (2)
November 2015 (1)
October 2015 (4)
September 2015 (5)
August 2015 (2)
July 2015 (2)
June 2015 (2)
May 2015 (1)
April 2015 (2)
March 2015 (1)
February 2015 (1)
January 2015 (1)
December 2014 (2)
November 2014 (1)
October 2014 (1)
September 2014 (2)
August 2014 (1)
July 2014 (2)
June 2014 (1)
May 2014 (2)
April 2014 (1)
March 2014 (2)
+1 800 256 3608 (toll-free North America only)