::run_tutorial(
learnrname = "Wrangling1",
package = "DataScienceExercises",
shiny_args=list("launch.browser"=TRUE))
🗓️ Session 10: Data preparation
In this session you learn how to turn your raw data into a state such that you can work with it. Luckily, there is one particular form for our data that represents the common starting point for all further operations, such as visualization or modelling. This form is called tidy data. And the goal of this session is to equip you with the tools that you need to turn the often messy raw data into tidy data. These skills are important because they make you independent: you will be able to prepare any data you find or create yourself such that you can further process it, and you will not rely on others to provide you data in a particular form.
👨🏫 Lecture Slides
Either click on the slide area below or click here to download the slides.
🎥 Lecture videos
All the videos are available via this playlist.
📚 Mandatory Reading
- The tutorial Data preparation
- Chapter 5 in Wickham et al. (2023).
Further Reading
- The help page for the selection helpers, which facilitate the selection of particular columns.
- Chapter 13 in Wickham et al. (2023).
- Chapter 14 in Wickham et al. (2023).
- Wickham (2014) on the concept of ‘tidy data’ (see the Github repo for reproduction of the paper)
✍️ Coursework
- Do the exercises
Wrangling1
from theDataScienceExercises
package
- Download data about the CO2 emissions for some countries of your choice from the World Bank website for the years 2000 to 2020. Set up an R project, save the data, import it, and make a line graph.
- If you want more exercises on the challenge of making data longer/wider, you can do the exercises
Wrangling2
from theDataScienceExercises
package
::run_tutorial(
learnrname = "Wrangling2",
package = "DataScienceExercises",
shiny_args=list("launch.browser"=TRUE))
References
Footnotes
You can ignore the
make_co2_data.R
for now and only look atmake_co2_plot.R
.↩︎