Press "Enter" to skip to content

Category: Visualization

Contrasting Two Visuals: Stacked Column Charts and Line Charts

Steve Jones performs a comparison:

I ran across an interesting post from Rita Fainshtein that looked at the different types of graphs for a set of data. I thought that was interesting, so I ran my own experiment. I found for my data, a line graph was better, but let me know what you think.

My data set was simple, a few players across a few events and their number of kills. I coach volleyball and I’m always trying to present stats in a useful way. Here was the small set I picked.

Something to keep note of is that line charts generally imply time series data: you are looking at some periodic activity and analyzing changes between periods.

The stacked column (or bar) chart tells you two things: the total and the first event. It’s really hard to discern any other events from a stacked chart comparison, as Steve points out.

If you don’t have periodic data or if you’re more focused on general trends than what happened at a specific event, the Cleveland dot plot (available in custom visuals) could plot each of the events, with the Y axis representing player names and the X axis representing number of kills, and each dot being a specific game. This saves a lot of real estate and gives you an idea of how points cluster, especially if you look at a larger number of games or players.

Comments closed

Testing a Power BI Theme on Existing Reports

Erik Svensen does a wardrobe upgrade:

But I want to see how my new theme might look on some old report where I might have used another theme or perhaps some reports other users have created where they have done some individual formatting instead of using the theme.

And did you know – we can do it and see the result for existing report in your workspaces – and we can directly modify the theme and see if we should change a color or a font size or a….

Read on for the process. This is a clever use of the embedding service, that’s for sure.

Comments closed

Rounded Corners in Power BI Error Bars

Mara Pereira trims off the edges:

If you’ve been following my posts, you probably know by now that one of the things that really annoys me in Power BI is not being able to build bar charts with rounded corners, unless you use a custom visual.

However, recently I found out about a trick to make this happen without needing to use custom visuals (special shout out to Federico Pastor who shared this trick with me!).

Read on to see how you can do this. It’s definitely not ideal, but if you absolutely need rounded corners for your bar chart, you can get them this way.

Comments closed

An Introduction to ggflowchart

Nicola Rennie shows off a new package:

Flowcharts can be a useful way to visualise complex processes. However, I couldn’t find an easy way to create a flowchart in R. There are a few packages for either drawing basic components of flowcharts (like {grid}), packages that are great for visualising complex network data where order doesn’t really matter (like {ggnetwork} and {igraph}), but none of them gave me the control over customisation I was used to with {ggplot2}.

{ggflowchart} tries to fill that gap. The aim of {ggflowchart} is to help R users make simple, good-looking flowcharts, with as little code as possible. It computes a layout, then uses existing {ggplot2} functions to stitch together rectangles, text, and arrows.

It does remind me a bit of Mermaid, though quite early in the process. H/T R-Bloggers.

Comments closed

Formatting Visuals in Power BI Desktop

Reza Rad shows off the new visual formatter in Power BI Desktop:

Where is the Format visual option in the new Power BI Desktop? There is a simple answer to this question, which I explained in this blog and video. This change applied from March 2023 version of Power BI Desktop, and by the time you read this article, it might be at general availability and the only way to format a visual in the Power BI Desktop.

I do hope they also keep the old way of formatting visuals, as there appear to be fewer clicks involved.

Comments closed

Using a Map in shiny

Steven Sanderson plots a course:

The code is used to create a Shiny app that allows the user to search for a type of amenity (such as a pharmacy) in a particular city, state, and country, and then display the results on a map. Here is a step-by-step explanation of how the code works.

Click through for notes, the code, and an example of the app in operation.

Comments closed

Charts and Color Over-Use

Rita Fainshtein shows examples of how over-usage of color makes charts harder to read:

Both graphs convey a message of ranking and grouping into categories.

The categories are shown in both cases in a color-coded manner instead of in a hierarchical format. As graph creators, why do we tend to create graphs with color categories?

1. The fear of being boring, one color seems uninteresting, and here we have both colors and icons. This is an “excellent” attribute for a storyteller.

2. Visually representing a group with similar characteristics makes sense.

But can such graphs tell us anything about groups? Are they easy to understand?

Let’s discuss a few aspects of those cases together:

Click through for the full story, including an alternative to using color as a way to categorize data.

Comments closed

Extending a tinyAML and shiny App

Steven Sanderson wraps up a series on shiny and tinyAML. Part 3 extends options for regression:

As data science continues to be a sought-after field, creating a reliable and accurate model is essential. While there are various machine learning algorithms available, the process of selecting the correct algorithm can be complex. The {tidyAML} package, part of the tidymodels suite, offers an easy-to-use, consistent interface for building machine learning models. In this post, we will explore a Shiny application that utilizes tidyAML to build a machine learning model.

Today I have updated the tidyAML shiny app to include the ability to set the parameter of the fast_regression() function .parsnip_fns and this is things like linear_reg.

And part 4 includes classification:

This is a Shiny app for building models using the {tidyAML} which is based on the tidymodels package in R. The app allows you to upload your own data or choose from one of two built-in datasets (mtcars or iris) and select the type of model you want to build (regression or classification).

Let’s take a closer look at the code.

This was an interesting series, for sure.

Comments closed

Creating a Clickable Word Cloud with Shiny

Mandy Norrbo builds a word cloud:

Word clouds are a visual representation of text data where words are arranged in a cluster, with the size of each word reflecting its frequency or importance in the data set. Word clouds are a great way of displaying the most prominent topics or keywords in free text data obtained from websites, social media feeds, reviews, articles and more. If you want to learn more about working with unstructured text data, we recommend attending our Text Mining in R course

Usually, a word cloud will be used solely as an output. But what if you wanted to use a word cloud as an input? For example, let’s say we visualised the most common words in reviews for a hotel. Imagine we could then click on a specific word in the word cloud, and it would then show us only the reviews which mention that specific word. Useful, right?

Read on to see how you can create one of these.

Comments closed

Removing Chartjunk

Elizabeth Ricks takes out the trash:

Why is clutter so hard for us to let go of? Perhaps because we think something has always been there, so it must belong there and we’re afraid of what might happen if we eliminate it. Or perhaps we don’t have a good framework for evaluating whether something is useful or not. 

This same concept applies to our graphs and business communications. We tend to blindly accept the default settings of our tools and very rarely consider if the included elements actually have a purpose. The “Windows XP” question, in this case, is: does this element add enough informative value to make up for its presence?” 

This is one of the most important ideas Edward Tufte championed—other than “pie charts are dumb, so don’t use them”. I don’t completely agree with Tufte’s definition of the term, which is (paraphrasing and going by memory) any marking on the page not absolutely necessary to convey the most relevant details to a viewer. But in this post, Elizabeth shows quite a bit we could remove while losing no critical information.

Comments closed