Skip to main content
HomeR

Course

Reshaping Data with tidyr

IntermediateSkill Level
4.8+
430 reviews
Updated 03/2023
Transform almost any dataset into a tidy format to make analysis easier.
Start Course for Free
RData Manipulation4 hr15 videos54 Exercises4,650 XP24,305Statement of Accomplishment

Create Your Free Account

or

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

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

Course Description

Data in the wild can be scary—when confronted with a complicated and messy dataset you may find yourself wondering, where do I even start? The tidyr package allows you to wrangle such beasts into nice and tidy datasets. Inaccessible values stored in column names will be put into rows, JSON files will become data frames, and missing values will never go missing again. You'll practice these techniques on a wide range of messy datasets, learning along the way how many dogs the Soviet Union sent into space and what bird is most popular in New Zealand. With the tidyr package in your tidyverse toolkit, you'll be able to transform almost any dataset in a tidy format which will pay-off during the rest of your analysis.

Prerequisites

Data Manipulation with dplyr
1

Tidy Data

You'll be introduced to the concept of tidy data which is central to this course. In the first two lessons, you'll jump straight into the action by separating messy character columns into tidy variables and observations ready for analysis. In the final lesson, you'll learn how to overwrite and remove missing values.
Start Chapter
2

From Wide to Long and Back

This chapter is all about pivoting data from a wide to long format and back again using the pivot_longer() and pivot_wider() functions. You'll need these functions when variables are hidden in messy column names or when variables are stored in rows instead of columns. You'll learn about space dogs, nuclear bombs, and planet temperatures along the way.
Start Chapter
3

Expanding Data

Values can often be missing in your data, and sometimes entire observations are absent too. In this chapter, you'll learn how to complete your dataset with these missing observations. You'll add observations with zero values to counted data, expand time series to a full sequence of intervals, and more!
Start Chapter
4

Rectangling Data

Reshaping Data with tidyr
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.8
from 430 reviews
85%
13%
1%
0%
0%
  • Ahmad kedebi
    4 hours ago

  • Lee
    2 days ago

  • Faruk
    2 days ago

  • Shawn
    2 days ago

  • Nestor
    3 days ago

  • Caleb
    3 days ago

Ahmad kedebi

Faruk

Shawn

FAQs

Is this course suitable for beginners?

Yes, this course is suitable for beginners. It starts with an introduction to the concept of tidy data that is fundamental to the course, which then progresses to the tidyr package functions, before introducing more sophisticated concepts such as pivoting and rectangling data.

Will I receive a certificate at the end of the course?

Yes, you will receive a certificate of completion after successfully completing all the chapters of the course.

What jobs would benefit from this course?

This course would be especially beneficial to anyone in the data science or analytics field, as the skills learned in this course are invaluable in reshaping and wrangling data for any kind of analysis or graphing. Additionally, this course would be beneficial to developers working with web APIs, as the rectangling data module teaches how to transform nested data structures into tidy, rectangular data.

Join over 19 million learners and start Reshaping Data with tidyr today!

Create Your Free Account

or

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

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.