Mar 14, 2018
|
8 min
|
46.3k views
What Is Data Wrangling? An Intro to tidyr and dplyr in R (Part 1)
Data wrangling is the work of getting data into the shape an analysis needs: reshaping the layout, filtering rows, adding columns and combining tables. Surveys put it at 50 to 80 per cent of a data scientist’s time. Two tidyverse packages make it faster: tidyr changes the layout of your data, and dplyr transforms it. This part covers tibbles, the View function and the pipe operator, which are the three things everything else in the series rests on.
What you will learn
What data wrangling means, and why it takes most of the working day Which two packages the series uses, and where to get the cheat sheet What a tibble is, and why it prints ten rows instead of filling your console How to convert a data frame to a tibble When to use View instead of printing What the pipe operator does, and why chains of pipes read better than nested calls Chapters 0:00 Who this series is for, and what it covers 0:31 Why data wrangling takes most of a data scientist’s time 1:34 The two packages, tidyr and dplyr, and the cheat sheet 2:38 What a tibble is, and why it prints differently 3:41 Turning a data frame into a tibble 4:44 Using View to see the whole dataset 5:16 The pipe operator, and what it does to your code 6:51 Why pipes get more useful as chains get longer 7:22 What wrangling means, and what comes next
The rest of the series Part 2, tidy data and tidyr: https://www.youtube.com/watch?v=1ELALQlO-yM Part 3, dplyr: https://www.youtube.com/watch?v=Zc_ufg4uW4U Part 4, joins and set operations: https://www.youtube.com/watch?v=AuBgYDCg1Cg
Learn more tidyverse: https://www.tidyverse.org Posit cheat sheets: https://posit.co/resources/cheatsheets/ R for Data Science: https://r4ds.hadley.nz
cheatsheets
dplyr
tibble
tidyr
tidyverse
tidyverse.org
What Is Data Wrangling
Data Wrangling in R
Tibbles
Tidyverse
Tidyr
Dplyr
Pipe Operator R
R for Data Science
Data Manipulation in R
Tidyverse Tutorial
R Tutorial for Data Science
Garrett Grolemund
Posit