Press "Enter" to skip to content

Category: Visualization

Customizing a Shiny App Theme

Peter Baranovskiy doesn’t want bog standard but is okay with mostly standard:

There are multiple ways to style or theme a Shiny app. A high-level overview is available in the Mastering Shiny book by Hadley Wickham. Here I’ll show the easiest way to do this. If you need to build an entirely – or mostly – new Shiny theme (e.g. a corporate theme), this post is probably not for you. In that case bslib may be the best starting point. Otherwise, if you are generally happy with a pre-made theme and just want to tweak some of its elements, read on.

This post is based on an actual app, so that you can see how it all works. Here’s the app’s source.

Click through to see what kinds of changes you can make without a major overhaul.

Comments closed

Decluttering a Dual-Axis Chart

Amy Esselman only needs one Y axis:

You may be confused and overwhelmed at first. Dual-axis graphs like this are inherently challenging. Whether you call them dual-axis graphs, combo charts, or secondary y-axis graphs, they always demand extra effort from a reader to figure out which data series to read against which vertical axis. 

Click through for a variety of ways to improve a busy dual-axis chart.

Comments closed

Data Visualization Technology Landscape

Andy Kirk has a catalog:

My long-running catalogue of Data Visualisation Resources has for many years been the most-popular, most-visited, and most-referenced content on my website. For the last couple of years, though, it has been a little stagnant with my limited time preventing the frequent updates it needed.

Having recently completed the migration of my website to a new host and undertaken a wide-spread redesign and restructure, it felt an opportune moment to roll up my sleeves and belatedly spend some time pruning the catalogue of out-dated references and introduce all the new ones that I’d encountered, and bookmarked, but not yet added.

Click through for that, as well as the Chartmaker Directory, which gives you an idea of which visuals are available in which products, as well as examples to see them in action.

Comments closed

Creating a Sparkline in the New Power BI Card Visual

Erik Svensen tries out an updated visual:

In the June 23 release of Power BI desktop we has been blessed with a new card visual that not only will give a better performance compared to adding multiple cards in the past but it also gives us some formatting options we have been dreaming of for a long time.

Here is a link to the official blogpost – New card visual | Public preview | Microsoft Power BI Blog | Microsoft Power BI

On social media you have probably already seen a lot of examples of usages, and I wanted to share how you can add a sparkline to the card to make it look something like this.

Erik does a good job of showing off the capabilities of this updated card visual.

Comments closed

Shiny Apps and Fullscreen Behavior

Tim Brock gives us a demo:

Browsers have been implementing variations on a JavaScript fullscreen API for over a decade. Unfortunately, for much of that time the APIs varied across browsers. This made actually using it in production somewhat cumbersome.

Finally, with the release of Safari 16.4 in March of this year, the latest versions of all major desktop browsers now support a single, standardized interface. Legacy versions of Safari for desktop are still in use and there’s still no support at all for the Fullscreen API on iPhones; so while you can cover most users with the standardized API, it should still be for progressive enhancement and not as a fundamental requirement for operation of an application.

Click through for the script.

Comments closed

Using SHAP to Gauge Geographic Effects in R or Python

Michael Mayer runs an analysis:

This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Python, the Python tab will be your friend.

This post is heavily based on the new {shapviz} vignette.

I appreciate the effort to include both R and Python code in this analysis, and recommend you peruse both sets of code listings.

Comments closed

Sketching before Charting

Alex Velez tries a few ideas:

It’s important to note that there isn’t a particular finding or insight that needs to be emphasized here. Instead, the goal for this visual is to provide the data in a digestible format, which will be part of a regularly updated report. That way, physicians and researchers can easily monitor any changes in the observations. 

I was unsure of the best way to approach this task, so I started sketching.

Click through to get Alex’s thought process while building a chart in Excel.

Comments closed

From Pie Chart to Stacked Bar Chart

Simon Rowe gives a multi-pie chart a once-over:

This data is from a small company that is looking to get a sense of its sales pipeline across its four regions–North, South, East and West. The data is broken into five categories which relate to the progression of any given opportunity–Prospect, Conversation, Presentation, Agreement and Formal Offer. 

The pipeline composition is expected to have minor variations between regions, but the proportion of opportunities at each stage should be consistent overall. Any notable discrepancies should be flagged to management immediately. 

Here we run into one of the main issues people have with data visualization: context is critical. A stacked bar chart is often not a good alternative for any cluster of pie charts. In this case it was a very good answer because of the nature of the exact problem to solve. If I need to make a generic report given the same raw data, it would be difficult for me to land on this specific visual.

Comments closed