Reshaping Data with tidyr
Transform almost any dataset into a tidy format to make analysis easier.
Commencer Le Cours Gratuitement4 heures15 vidéos54 exercices17 996 apprenantsDéclaration de réalisation
Créez votre compte gratuit
ou
En continuant, vous acceptez nos Conditions d'utilisation, notre Politique de confidentialité et le fait que vos données sont stockées aux États-Unis.Formation de 2 personnes ou plus ?
Essayer DataCamp for BusinessApprécié par les apprenants de milliers d'entreprises
Description du cours
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.
Formation de 2 personnes ou plus ?
Donnez à votre équipe l’accès à la plateforme DataCamp complète, y compris toutes les fonctionnalités.Dans les titres suivants
Manipulation de données en R
Aller à la pisteImportation et nettoyage des données en R
Aller à la pistePrincipes de base de Tidyverse en R
Aller à la piste- 1
Tidy Data
GratuitYou'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.
What is tidy data?50 xpTidy data structure100 xpMultiple variables per column100 xpColumns with multiple values50 xpInternational phone numbers100 xpExtracting observations from values100 xpSeparating into columns and rows100 xpMissing values50 xpAnd the Oscar for best director goes to ... <NA>100 xpImputing sales data100 xpNuclear bombs per continent100 xp - 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.
From wide to long data50 xpNuclear bombs per country100 xpWHO obesity per country100 xpBond... James Bond100 xpDeriving variables from column headers50 xpNew-Zealand's bird of the year100 xpBig tech stock prices100 xpDeriving variables from complex column headers50 xpSoviet space dogs, the dog perspective100 xpWHO obesity vs. life expectancy100 xpUncounting observations100 xpFrom long to wide data50 xpSoviet space dogs, the flight perspective100 xpPlanet temperature & distance to the Sun100 xpTransposing planet data100 xp - 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!
Creating unique combinations of vectors50 xpLetters of the genetic code100 xpWhen did humans replace dogs in space?100 xpFinding missing observations100 xpCompleting data with all value combinations50 xpCompleting the Solar System100 xpZero Olympic medals100 xpCreating a sequence with full_seq()100 xpThe Cold War's hottest year100 xpAdvanced completions50 xpOlympic medals per continent100 xpTracking a virus outbreak100 xpCounting office occupants100 xp - 4
Rectangling Data
In the final chapter, you'll learn how to turn nested data structures such as JSON and XML files into tidy, rectangular data. This skill will enable you to process data from web APIs. You'll also learn how nested data structures can be used to write elegant modeling pipelines that produce tidy outputs.
Intro to non-rectangular data50 xpRectangular vs. non-rectangular files100 xpRectangling Star Wars movies100 xpFrom nested values to observations50 xpUnnesting wide or long100 xpRectangling Star Wars planets100 xpThe Solar System's biggest moons100 xpSelecting nested variables50 xpHoisting Star Wars films100 xpHoisting movie ratings100 xpNesting data for modeling50 xpTidy model outputs with broom100 xpNesting tibbles100 xpModeling on nested data frames100 xpCongratulations!50 xp
Formation de 2 personnes ou plus ?
Donnez à votre équipe l’accès à la plateforme DataCamp complète, y compris toutes les fonctionnalités.Dans les titres suivants
Manipulation de données en R
Aller à la pisteImportation et nettoyage des données en R
Aller à la pistePrincipes de base de Tidyverse en R
Aller à la pisteensembles de données
Nuclear explosions dataPlanet dataStar Wars dataNetflix dataANSUR II dataOlympic medals datacollaborateurs
prérequis
Data Manipulation with dplyrJeroen Boeye
Voir PlusMachine Learning Engineer @ Faktion
Qu’est-ce que les autres apprenants ont à dire ?
Inscrivez-vous 15 millions d’apprenants et commencer Reshaping Data with tidyr Aujourd’hui!
Créez votre compte gratuit
ou
En continuant, vous acceptez nos Conditions d'utilisation, notre Politique de confidentialité et le fait que vos données sont stockées aux États-Unis.