Skip to main content
HomeR

Categorical Data in the Tidyverse

Get ready to categorize! In this course, you will work with non-numerical data, such as job titles or survey responses, using the Tidyverse landscape.

Start Course for Free
4 hours13 videos44 exercises14,717 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

Loved by learners at thousands of companies


Course Description

As a data scientist, you will often find yourself working with non-numerical data, such as job titles, survey responses, or demographic information. R has a special way of representing them, called factors, and this course will help you master working with them using the tidyverse package forcats. We’ll also work with other tidyverse packages, including ggplot2, dplyr, stringr, and tidyr and use real world datasets, such as the fivethirtyeight flight dataset and Kaggle’s State of Data Science and ML Survey. Following this course, you’ll be able to identify and manipulate factor variables, quickly and efficiently visualize your data, and effectively communicate your results. Get ready to categorize!
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.
DataCamp For BusinessFor a bespoke solution book a demo.

In the following Tracks

Tidyverse Fundamentals in R

Go To Track
  1. 1

    Introduction to Factor Variables

    Free

    In this chapter, you’ll learn all about factors. You’ll discover the difference between categorical and ordinal variables, how R represents them, and how to inspect them to find the number and names of the levels. Finally, you’ll find how forcats, a tidyverse package, can improve your plots by letting you quickly reorder variables by their frequency.

    Play Chapter Now
    Introduction to qualitative variables
    50 xp
    Recognizing factor variables
    100 xp
    Qualitative variables in theory
    50 xp
    Understanding your qualitative variables
    50 xp
    Getting number of levels
    100 xp
    Examining number of levels
    100 xp
    Examining levels
    100 xp
    Making better plots
    50 xp
    Reordering a variable by its frequency
    100 xp
    Ordering one variable by another
    100 xp
  2. 3

    Creating Factor Variables

    Having gotten a good grasp of forcats, you’ll expand out to the rest of the tidyverse, learning and reviewing functions from dplyr, tidyr, and stringr. You’ll refine graphs with ggplot2 by changing axes to percentage scales, editing the layout of the text, and more.

    Play Chapter Now
  3. 4

    Case Study on Flight Etiquette

    In this final chapter, you’ll take all that you’ve learned and apply it in a case study. You’ll learn more about working with strings and summarizing data, then replicate a publication quality 538 plot.

    Play Chapter Now
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.

In the following Tracks

Tidyverse Fundamentals in R

Go To Track

datasets

538 Flying Etiquette surveyKaggle multiple choice responses

collaborators

Collaborator's avatar
Chester Ismay
Collaborator's avatar
Becca Robins
Emily Robinson HeadshotEmily Robinson

Senior Data Scientist, Game Data Pros

Emily is a Senior Data Scientist at Game Data Pros. Follow her at @robinson_es on Twitter and on her blog, Hooked on Data.
See More

What do other learners have to say?

Join over 15 million learners and start Categorical Data in the Tidyverse today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.