Skip to main content

Visualization Best Practices in R

Learn to effectively convey your data with an overview of common charts, alternative visualization types, and perception-driven style enhancements.

Start Course for Free
4 Hours13 Videos49 Exercises12,729 Learners4200 XPData Visualization Track

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

This course will help you take your data visualization skills beyond the basics and hone them into a powerful member of your data science toolkit. Over the lessons we will use two interesting open datasets to cover different types of data (proportions, point-data, single distributions, and multiple distributions) and discuss the pros and cons of the most common visualizations. In addition, we will cover some less common alternatives visualizations for the data types and how to tweak default ggplot settings to most efficiently and effectively get your message across.

  1. 1

    Proportions of a whole


    In this chapter, we focus on visualizing proportions of a whole; we see that pie charts really aren't so bad, along with discussing the waffle chart and stacked bars for comparing multiple proportions.

    Play Chapter Now
    Grammar of Graphics intro
    50 xp
    Familiarizing with disease data
    100 xp
    Warming up data-wrangling
    100 xp
    The pie chart and its friends
    50 xp
    The infamous P-I-E
    100 xp
    Cleaning up the pie
    100 xp
    How about a waffle?
    100 xp
    When to use bars
    50 xp
    Basic stacked bars
    100 xp
    Ordering stack for readability
    100 xp
    Categorical x-axis
    100 xp
  2. 2

    Point data

    We shift our focus now to single-observation or point data and go over when bar charts are appropriate and when they are not, what to use when they are not, and general perception-based enhancements for your charts.

    Play Chapter Now
  3. 3

    Single distributions

    We now move on to visualizing distributional data, we expose the fragility of histograms, discuss when it is better to shift to a kernel density plots, and how to make both plots work best for your data.

    Play Chapter Now
  4. 4

    Comparing distributions

    Finishing off we take a look at comparing multiple distributions to each other. We see why the traditional box plots are very dangerous and how to easily improve them, along with investigating when you should use more advanced alternatives like the beeswarm plot and violin plots.

    Play Chapter Now

In the following tracks

Data Visualization


dcamposlizDavid CamposchesterChester IsmayshoninouyeShon Inouye
Nicholas Strayer Headshot

Nicholas Strayer

Biostatistician at Vanderbilt

I am currently biostatistician and data scientist at Vanderbilt University. My research focuses on the fusion of machine learning and data visualization to explore and explain electronic health records data. I have worked as a data journalist in the graphics department at the New York Times, a data scientist at Johns Hopkins University Data Science Lab, and as a 'Data Artist in Residence' at data visualization startup Conduce. I am active on Twitter @nicholasstrayer and blog about data science and visualization with fellow DataCamp instructor Lucy D'Agostino McGowan at Live Free or Dichotomoize.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA