VizWiz

Launch, grow, and unlock your career in data
Showing posts with label stacked bar chart. Show all posts

April 13, 2024

How to Create a Proportional Stacked Bar Chart in Tableau

No comments

Proportional stacked bar charts are a good way of showing the size and proportion of data at the same time.

April 6, 2024

18 Ways to Visualize Bar Charts in Tableau

No comments

The SECRET to never choosing the wrong chart...the Bar Chart! Here are 18 options for your next bar chart.

Tableau tutorial and workbook here.

April 1, 2024

#WatchMeViz: Can viral infections be cured with antibiotics?

No comments
I'm really surprised, though maybe I shouldn't be, about the results from a poll of 1206 Americans by KFF. They asked a simple question: 

"Can viral infections usually be cured by antibiotcs, or not? Or do you not know enough to say?"

According to the results, women know better than men, as do adults with higher incomes and higher levels of education.

I took on this data set for Watch Me Viz for Makeover Monday week 14. Check out my final viz here. There's an image below the video.


August 7, 2023

#MakeoverMonday Week 32 - The Gap in Parental Leave

No comments

The gap in parental leave is extremely wide across all industries in America. 

How do only 23% of women get 14+ weeks of maternity leave? Why isn't progress being made to help dads take a more active role?

Check out the livestream recording and interactive viz below.

June 26, 2023

#MakeoverMonday 2023 Week 26: The UK's Drinking Culture

No comments
This week I delve into drinking, a topic that has long been integral to British culture. 

We covered lots during the live stream. I started by attempting to recreate the original, but couldn't get it to work. I went on to build:

1. Stacked bars
2. Stacked bars with labels above the bars (there are a few neat tricks in this one)
3. Circle on a dotted line
4. Donut chart, bar chart combination chart
5. Bullet graphs
6. A mobile view that's a different sheet

Building the mobile view hopefully showed everyone how to leverage sizing objects in a dashboard. If you haven't watched, I created a 2nd sheet that I could format separately to fit on a mobile device. To the user, it would look like the same chart.

The trick is to float the 2nd sheet and make it 1x1 size. Because it's on the dashboard, you can then use the sheet in the mobile view. Check it out, you'll like it.

I'm pretty happy with where I got to in the end. Enjoy the live stream and check out the viz below or here.


August 24, 2021

#MakeoverMonday 2021 Week 34 - Entry-Level Jobs on LinkedIn Requiring 3+ Years Of Experience

No comments
Eva sent me an interesting, and ironic data set for this week. It's based on a studying done on LinkedIn of jobs that advertise as "entry-level" yet require 3+ years of experience. I'm still having trouble wrapping my head around that.

In this week's Watch Me Viz, I tried something new. I used both Tableau and Power BI. I focused on methods for rebuilding the original chart. Unfortunately, the PBI demo didn't go so well. That wasn't any fault of PBI, but rather my laptop, as I have to run Parallels on my Mac in order to run PBI and I was also live streaming. Either way, I hope you find it useful.


July 6, 2021

#MakeoverMonday Week 27 - If Only _____ Voted

No comments
This week's data set was one of the most interesting we've had for Makeover Monday. I found it fascinating to see some of the extreme polarization in the demographics of US voters in the 2020 election.

Resources:

2. Original Viz - https://bit.ly/3qQGsAo
3. How to Create a Trellis Chart - https://www.vizwiz.com/2021/02/trellis-chart.html
4. The Data Visualisation Catalogue - https://datavizcatalogue.com/ 

The original was really good and I didn't particularly want to create a map. Instead, I wanted to visualize all of the demographics at the same time to see if any patterns emerged. I find them a bit hard to see in what I created, but when I know what I'm looking for (e.g., women vs. men) then the contrasts really stand out.

I create the heatmap the way I did for two reasons:

  1. To see across each metric in order to identify consistent blue or red patterns for an entire demographic (e.g., early voting or urban).
  2. To see if individual States always voted for Biden or Trump irrespective of the demographic (e.g., CA, MA, MD for Biden or KS, KY, LA for Trump).

There are parts of Watch Me Viz you can skip, like early on when I build some maps and try to join the data together (unsuccessfully) or when I change the data to Excel format.

Thanks for tuning in! Interact with the viz by clicking on the image below or here.


February 8, 2021

#MakeoverMonday Week 6: Why Are Women Perceived to Be Unequal to Men?

No comments

Wow! What a fun #WatchMeViz that was! I iterated through 16 charts and then when the idea solidified, there was some great conversation and feedback on the chat to help me get to the end. I find survey responses quite difficult to visualize, so instead of getting frustrated, I thought about all of the ways I can compare data to see if anything would work.

Most importantly, thank you to all of your on the live chat. It makes a huge difference to me and I love getting your feedback and questions along the way. You make me better. You can find the final visualization below the video.


January 26, 2021

Three Methods for Creating Bar Charts that Fill to 100%

No comments
Bar charts that show % of total or percentages below 100% can be made to look a bit nicer by including a color that shows the remainder of the bar chart going up to 100%. 

In this video, I show you three methods for creating bar charts that go up to 100% by including another field in the view.

Download the data I used here to follow along.

December 8, 2020

#TableauTipTuesday: How to Sort a Chart with a Parameter Action

No comments
In this tip, I show you how to use a parameter action to sort a stacked bar chart. This technique can also be applied to other chart types.

There are seven steps:

  1. Build the chart
  2. Create a parameter
  3. Create a calculated field to sort the bars, then sort the Region field.
  4. Create de-highlight calculated field and place it on the Detail shelf
  5. Create a Parameter Action
  6. Create a Highlight Action
  7. Turn on Animations

References:


November 10, 2020

#TableauTipTuesday: How to Reorder a Stacked Bar Chart with Set Actions

No comments
One of the drawbacks of stacked bar chart is that it can be difficult to see the contribution to the total for any sections of the bar except the bottom. In this tip, I show you how to click on any portion of a bar to move it to the bottom of the stacked bar chart, thus making it easier to understand its contribution.

November 9, 2020

#MakeoverMonday Week 45 - Global Share of Nintendo Switch Software & Hardware Sales

No comments

For #MakeoverMonday week 45, we were analyzing the software and hardware units sold across several regions, as defined by Nintendo itself. The data was pretty simple. I started by doing some basic data prep to simplify the names of the fields and to pivot the data to make it easier to compare the years.

In this video, I will first review the initial visualization and talk about what works and what does. I then iterate through several methods for visualizing the data, hoping to find one that works well with this data set. With feedback from the viewers, I was able to create a bar chart that compares the percentage of global units sold of software vs. hardware for Nintendo.

I showed several methods for visualizing the data:

  1. Line charts (several versions)
  2. Stacked bar chart
  3. Side-by-Side Bar
  4. Tables
  5. Scatter plot
  6. Connected scatterplot

Resources:

  1. Data Set - https://data.world/makeovermonday/2020w45-dedicated-video-game-sales-units
  2. Final visualization - https://bit.ly/MM2020W45
  3. Tableau Color Palette Generator - https://color.tableaumagic.com/
  4. Colors from Image Tool - https://html-color-codes.info/colors-from-image/
  5. ASCII character reference - https://jrgraphix.net/r/Unicode/27F0-27FF



September 28, 2020

#MakeoverMonday 2020 Week 39 - Child Marriage Around the World

No comments

Week 39 brought another #Viz5 topic, this time it was about children that are now 20-24 who were married under the age of 18. Child marriage is, of course, horrific and it's a violation of human rights. Unicef has done an excellent job of recapping all of the issues and why these marriages happen on their website here.

As I've mentioned before, I ALWAYS find these Viz5 data sets tought. I'm not sure why; perhaps I have a mental block on them now. This week the data set was three columns: country, female %, and male %. That can't be too tough...right?

Well, I sure made it tough. First, I joined the data to regional mappings from Unicef so that I could possibly look at the data at the regional level; I decided to use medians for each region in the end. Then I went into Tableau and built a bunch of charts to explore the data. I used chart guides to help me think through options and none of them seemed to make any particularly interesting insights pop out.

After about two hours of nothing, I got the idea of simply looking at the % of females that were married under the age of 18. I ended up with a simple bar chart, which turned out to not be too far from the first chart I created a few minutes in.

Here's the #WatchMeViz video and below is the visualization. Thanks to those that watched live and contributed ideas along the way!! It really helps knowing others are there encouraging me.


February 11, 2019

Makeover Monday: How President Trump Spends His Executive Time

No comments
Axios published a fascinating article and data set last week with details of President Trump's hourly schedule. To say "Executive Time" is a major part of his day would be a gross understatement. The article doesn't give any specifics about how that time is actually spent, however it does provide some interesting insight:

  • Trump usually spends the first 5 hours of the day in Executive Time.
  • He spends his mornings in the residence, watching TV, reading the papers, and responding to what he sees and reads by phoning aides, members of Congress, friends, administration officials and informal advisers.
  • Trump doesn't take an intelligence briefing until 11am or 11:30am, and they only last 30 minutes.

The list, sadly, goes on. The viz they posted that we're making over this week is this simple stacked bar chart.


What works well?


  • Using a color that stands out over the others to highlight executive time
  • The title tells me what the viz is about.
  • The subtitle provides context as to the amount of data that the chart summarizes.
  • Simple labeling
  • Including the total time at the bottom and stretching the lines to the ends of the stacked bar chart

What could be improved?

  • It's hard to compare the executive time to all other time. A percentage would be helpful.
  • Would the stacked chart be better as a horizontal bar chart with two rows?

What I did

  • I wanted to look at the frequency of executive time by hour of day and day of week. Does Trump spend the same amount of executive time each day?
    RESULT: The first couple heatmaps looked terrible, but visualizing by weekday looks ok.
  • Do big numbers help tell the story in the data?
    RESULT: Yes, they help summarize the data well, but didn't help my end product.
  • Are there any trends in the data? That is, is executive time increasing or decreasing? Or has it been consistent?
    RESULT: The trends are not very useful.

In the end, I thought visualizing the data as stacked bar charts by weekday looked the best. I built quite a few charts that turned out completely useless. However, there comes a point when something is good enough. That's where I ended up. Click on the image below for the interactive version.

November 26, 2018

Makeover Monday: The Cost of a Night Out

No comments
For Makeover Monday week 48, Eva chose this visualization from Thrillist (created by Statista):


What works well?

  • Choosing a topic that is relatable
  • Good title and subtitle
  • Sorting the bars from most expensive to least expensive
  • Using colors that are easy to distinguish
  • Including the labels on the ends to the bars

What could be improved?

  • Lose the icons on the lower right
  • Remove the gridlines and axis labels (they're not necessary if the ends of the bars are labeled)
  • Remove the flags next to each city; First they add no value. Second, the data is about cities not countries.
  • The title is a bit misleading; this is only a selection of cities.
  • Using a stacked bar chart makes comparisons across the items difficult; maybe if this was interactive and you could choose the item to sort by, it would work better.

What I did

  • I wanted to make the comparisons easier, so I chose to create a bump chart.
  • I added a highlight selector so the user can focus on a single city, yet keep the others in the view for context.
  • I sorted the values from least expensing (top) to most expensive (bottom).

With that, here's my Makeover Monday week 48.

December 24, 2017

Makeover Monday: Americans Favor Fake Christmas Trees More and More

No comments
And with this post, another incredible year of Makeover Monday is done and dusted. My expectations have been ridiculously exceeded and I can't wait to see how we break down even more barriers and get even more people involved next year.

Here's my challenge for everyone that participates...Get one new person to participate. That's it! Simple! Do it! Everyone will benefit.

For week 52, Eva chose a simple viz from Statista about real vs. fake Christmas tree purchases by Americans. We switched to fake about eight or nine years ago and haven't regretted it one bit. Every year we think about that one tree we have saved.

Statistic: Christmas trees sold in the United States from 2004 to 2016 (in millions) | Statista

What works well?

  • Nice interactivity on the tooltips
  • Colors are easy to distinguish
  • The tops of the stacked bars allow you to see the overall trend of all tree purchases

What could be improved?

  • Including all of the labels on the bar is distracting
  • Remove the shadows from the text
  • Use colors that are associated better with trees (like green)
  • Use a more impactful title and the wrapping is sloppy
  • Use a smaller footer that won't take up way so much space

My Goals

  • Complete something quick; it's Christmas Eve after all
  • Find something interesting in the data
  • Use Christmasy colors
  • Use a title that tells the user what they're seeing

With those goals in mind, here is my last Makeover Monday for 2017. See you next year!

October 9, 2016

Makeover Monday: How satisfied are people with public transportation in some of Europe's biggest cities?

3 comments
This week for #MakeoverMonday, we look at this simple stacked bar chart of public transportation satisfaction survey results from the Financial Times.


I first saw this survey in print at Gatwick airport on my way to Prague, then it appeared in feedly. I know from speaking to John Burn-Murdoch that the print and online graphics standards are different. The print version I actually found easier to understand because it used blue for negative sentiment.

What works well?

  • Clear sorting by very satisfied
  • Sticks to their color guidelines
  • Simple title

What could be done differently?
  • Use different colours for the negative and positive sentiment
  • Add an overall score (like net promoter score)
  • Include 2012 for comparison so that you can see which of these cities improved
  • Add a more descriptive title so it's even more clear what the audience is looking at

I used a few resources to help me create my final visualisation:

First, I recreated the FT viz, but with different colors for negative and positive sentiment. I also included bar charts in the tooltips.


Next, I included 2012 and labeled the bars where they fit.


I don't particularly like the labels on the bars, so I've removed them from the final version. I also changed the bars to a Likert scale, which moves the negative to the left and positive to the right, and helps shows the discrepancy better. I also included the net promoter score.

Last, I added a slope graph to help show the change and included a more descriptive title and subtitle. You can click on any bar and it'll highlight in both places.

August 8, 2016

Makeover Monday: Who’s Winning the Summer Olympics?

12 comments

With the Olympics starting this weekend, I thought we’d take a look at the most classic way that people display Olympic medal counts, as stacked bars. Being an American, I pretty much have only known NBC as the host of the Olympics, so when I went to their website and looked for historical medal counts, I was mortified. This viz is just about as bad as it can get.


What works well?

  • The countries are ordered from most medals to least.
  • There’s cute little actions when you click on the medals.
  • They used appropriate colors for each medal type.

Seriously, that’s all I see that’s any good. This is an incredibly poorly done graphic.

What doesn’t work well?

  • There’s no title.
  • There aren’t any tooltips, so I have no idea how big each bar is; I’m forced to guess.
  • I can only see seven countries at a time, and I can’t even see the name of the seventh country. I mean, who would ever want to compare only the 15th-21st ranked countries?
  • When I click on the scroll button, it scrolls by an increment of 2. Why?
  • Comparisons are nearly impossible with a stacked bar except for the total medal count and bronze.

Here are some of the changes I made:

  • I separated out each medal into a dot plot and chose to show only the top 25.
  • I included a summary next to each country to provide the exact medals counts.
  • I included a mobile view, but in this view I remove this summary for a better visual look.
  • I included informative tooltips.
  • I included a title so you know what the chart is about.
  • I included filters so the user can decide which Olympic games to include.
  • The "sort by" option allows the user to pick the medal count to sort by making comparisons easier.


May 8, 2016

Makeover Monday: How Many Hours Do Women Work in OECD Countries?

4 comments

Since Sunday is Mother’s Day in the States, this week’s Makeover Monday topic is about how many hours women work in various OECD countries. Let’s start by reviewing the original chart by Business Insider:


What works well?

  • The stacked bar chart is relatively easy to understand since it only has four colors and there aren’t that many countries to compare.
  • The chart is sorted by the smallest percentage of women working 40+ hours per week, which makes it easy to compare that category.
  • The colors are easily distinguishable.
  • Easy to read headers

What doesn’t work well?

  • I have no idea what year this data is from. The data goes back to 1976. I assumed it was for 2016, since that’s when the article was written, but after finding the data myself, it looks like it’s from 2014.
  • The title of the article "American women work way more than their European counterparts” isn’t entirely true. The chart doesn’t show all of the countries is Europe from OECD. The U.S. would rank 9th is you compare European countries and the U.S. from 2014.
  • The chart title is useless.
  • Japan isn’t in Europe, so why is that included?
  • Why is the OECD average included if this is supposed to be the U.S. compared to Europe?
  • There’s no rationale to the countries they chose to include. Is the author being deceitful on purpose? I hope it’s merely an oversight.
  • While I don’t think this stacked bar chart is terrible, it does make it very hard to compare any of the other categories of hours worked.


The first thing I did was rebuild the chart including all of the OECD countries and reversing the sort to be by the highest rate of women working 40+ hours.

Click to interact


I included several filtering and sorting options to allow the user to find their own story. The user can scroll through all of the years and see how the story unfolds. This view solves the problem of not being able to sort by any of the other categories of hours worked.

I didn’t love this though, so I created a slightly different version that shrinks the bars and adds dots. Think of it as a stacked dot chart.

Click to interact


This is the beauty of Tableau. I can quickly iterate on ideas and see which one I like best. At first, I thought adding the dots would make it easier to understand. I think it looks pretty neat, but actually, I think I made it harder to understand.

The problem in both of these stacked charts is that I can’t see all of the years in one view. I was really curious as to the patterns. Has the % of women working 40+ hours per week in the U.S. grown? How does that compare to the OECD average? How do other countries compare?

With those thoughts in mind, I created this series of line charts across the different work hours ranges.

Click to interact


I love these types of charts. I created one last week as well. What I like about them is they include lots of context. In this particular example, I can clearly see that the U.S. is higher than the OECD average in the 40+ hours worked per week section. Yet I can also see that there are quite a few OECD countries that are higher than the U.S. I can easily compare Europe to North America. Or only look at the top 10 countries according to U.S. News and World Report. I can zoom into a specific working hours category with a simple tap on the filter.

I almost stopped here, because I think this already is much better than the original. However, I wanted to see of there was a better way to compare the different work hours within a single country. To address that, I thought a small multiples view might work well.

Click to interact


I chose to sort the countries by the highest % of women working 40+ hours per week in 2014. Then you read it in a z-pattern. So this view let’s you see where a country ranks amongst the others and you can also compare the hours worked within a single country.

Then it hit me. I quickly went to Andy Cotgreave’s blog and found this viz he created a few weeks ago:


Yes! This is it! It even matches the colors I was using. I duplicated the previous viz and changed it to an area chart. I then added some of the filtering options back.

NOTE: If you’re viewing this on a phone, you’ll see a long skinny version with less filtering and that also has the sorting option removed.

It took me five iterations, but I got there in the end. I’m not sure how I could have done this quicker with any tool other than Tableau. I love how I can fail fast! Which version do you like best?