FROM DATA TO
VISUALIZATION
BAR CHART
Tien-Lam Pham. Phd
Van-Quyen Nguyen. M.sc
Falculty of Computer Science
WHY BAR CHART
A barplot shows the relationship between a numeric and a categoric variable.
WHY BAR CHART
Grouped barplot
WHY BAR CHART
Stacked barplot
WHY BAR CHART
Stacked barplot
WHY BAR CHART
Customized barplot
color
label
stick
text
texture
lengend
Hiking locations in Washington.
https://github.com/rfordatascience/tidytuesday/tree/master/data/2020/2020-11-24
COMMON MISTAKES
Color
DON’T USE COLOR IF THEY
COMMUNICATE NOTHING
COMMON MISTAKES
Baseline
COMMON MISTAKES
width
width = 0.9 width = 0.3 width = 0.6
COMMON MISTAKES
3D_barplot? DON’T
COMMON MISTAKES
3D_barplot? DON’T
https://www.storytellingwithdata.com/blog/
2017/3/29/declutter-this-graph
COMMON MISTAKES
3D_barplot? DON’T
https://www.storytellingwithdata.com/blog/2017/3/29/
declutter-this-graph
COMMON MISTAKES
Long labels? Think of an horizontal version
COMMON MISTAKES
Long labels? Think of an horizontal version
COMMON MISTAKES
Long labels? Think of an horizontal version
SOME SUGGESTION
Hightlight
SOME SUGGESTION
Split bar chart:
Split Bars are great when you have related numbers for a range of categories.
SOME SUGGESTION
If your columns or bars have an inherent order (e.g. years or months), you can show them
as a line chart.
SOME SUGGESTION
If you want or need to use a column or bar chart, you can change the underlying values to
make it work anyway. For example, you can calculate the differences between the bars/
columns. Note that this only works if your columns can be ordered, e.g. by years or months.
WHEN TO USE STACKED COLUMN
CHARTS
Stacked column charts work well when the focus of the chart is to compare the totals and
one part of the total
WHEN TO USE STACKED COLUMN
CHARTS
Stacked column chart can work well for dates, but should only be considered if the total of
your parts is crucial
WHEN TO USE STACKED COLUMN
CHARTS
If you want to use stacked column charts for time data, make sure your dates have the same
intervals. if the intervals between your dates are different, use an area chart (or line chart).
WHEN TO USE STACKED COLUMN
CHARTS
For time data, also consider a line chart if you want to show that one share overtook
another one.
WHEN TO USE STACKED COLUMN
CHARTS
Stacked column charts are great to show the parts of multiple totals. If you only want to
show parts of one total, consider a bar chart instead.
WHEN TO USE STACKED COLUMN
CHARTS
Stacked column charts work well for only a few totals.
WHEN TO USE STACKED COLUMN
CHARTS
Stacked column charts work well when totals have short labels.
HOW TO MAKE YOUR STACKED COLUMN
CHARTS BETTER
Bring the most important value to the bottom of the chart and use color to make it stand
out.
HOW TO MAKE YOUR STACKED COLUMN
CHARTS BETTER
Consider stacking percentages (so that every total will sum up to 100%).
HOW TO MAKE YOUR STACKED COLUMN
CHARTS BETTER
Make sure that you include all parts of the total in your charts – and only parts of the
total. Don’t include the total in your chart.
HOW TO MAKE YOUR STACKED COLUMN
CHARTS BETTER
Consider grouping tiny parts together into one bigger part (e.g. “others”) to clean up the
overall look of the chart.
3. SOME SUGGESTION
Hightlight
http://www.datavizdoneright.com/2017/12/
blackpool.html
3. SOME SUGGESTION
Interactively
3. SOME SUGGESTION
Lollipop/ Circular barplot
4. ASSIGNMENT
Using barchart, lolipop, visualize data “7_OneCatOneNum.csv“ on the canvas system
The dataset used as an example provides the quantity of weapons exported by the
top 50 largest exporters in 2017. This dataset has been downloaded on the
Stockholm International Peace Research Institute website and more information
about it are available here.
http://www.sipri.org/databases/armstransfers/sources-and-methods/