Join Mike Chapple for an in-depth discussion in this video Making long data sets wide, part of Cleaning Bad Data in R.
- [Instructor] While data scientists…often find themselves needing to take a wide dataset…and make it longer,…they sometimes need to perform the reverse operation…and make a long dataset wider.…Earlier in this course…I showed you a Mexican Weather dataset…and walked you through an example of making it tidier.…At one point in the process, I had the intermediate result.…I had two temperature records for each weather station…on each date.…One row contained the maximum temperature for that date…while the other contained the minimum temperature.…
These are really two different values,…the maximum and the minimum,…for the same observation,…temperature over the course of the day.…To make this dataset tidy, I want to combine the two rows…for the same date and station into a single row.…The tidier library within the tidyverse…contains a function called spread…that takes a long dataset and makes it wide…by spreading the information from different rows…across columns.…The spread function performs this conversion…using the same concept as keys and values…
Where possible, instructor Mike Chapple shows how to correct the issues using R, but the same principles can be applied to any statistical programing language.
- Missing data
- Duplicate rows and values
- Converting data
- Formatting data
- Working with tidy data
- Tidying data sets
- Dealing with suspicious data
Skill Level Beginner
1. Missing Data
2. Duplicated Data
3. Formatting Data
5. Tidy Data
6. Red Flags
What's next?1m 5s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.