In this instructional segment, the instructor guides learners through a series of data‑wrangling and visualization steps using the tidyverse in R. After confirming that the dataset is already clean, the lesson focuses on filtering the data to retain only European countries, leveraging dplyr's `filter()` with the `in` operator to select multiple values efficiently. Learners then explore the distribution of two labor‑market indicators—weekly working hours and hourly compensation—for the year 2006 by creating histograms with ggplot2. To examine the relationship between these variables, a scatterplot is built using `geompoint()`. The instructor emphasizes the importance of clear titles and axis labels, showing how to add them with `labs()`. Finally, the session revisits `groupby()` and `summarise()` to compute median weekly working hours per country, preparing a summary table that will later be styled for a report. Throughout, the tone is instructional and supportive, encouraging learners to apply each step in hands‑on exercises.
Chapters
Good job pre processing the data. This task often takes a lot of time, but here you are lucky to work with data that is already in a clean and tidy format. In the remainder of this chapter you are going to further explore the relationship between weekly working hours and hourly compensation and the scatter plot is a good visual exploration form to do this. Before visualizing this relationship, you'll need to use the filter function to retain only European countries in the dataset. That's a good set of countries where Data for both 1996 and 2006 are available. The years you're going to compare in the second chapter of this course you already know how to use the filter function as shown in the code example here where only Switzerland is retained. However, you might not know the so called in operator which often makes queries easier. While the equality operator in the previous example can filter for only one value at a time, the in operator can look up multiple values like in this example here we filter for countries in the vector on the right hand side of the in operator, which is actually equivalent to using the or operator with multiple equality operators. So in the following exercise you you are going to use this new in operator to only retain European countries in the dataset. Let's look at both labor market indicators with ggplot2 we can quickly create a histogram of both the weekly working hours variable and the hourly compensation variable. This shows us the distribution of these values in 2006. However, in order to see the relationship between both variables, we need to use ggplot's point geometry and this is what you're going to do in the following exercises. You're going to create the scatterplot shown here using QGplot's geompoint function. Still, without proper titles and labels, the plot is pretty worthless. In a follow up exercise you are going to use QGplot's lapse function to provide more information to the readers of your plot. You're also going to quickly repeat some dplyr functions like groupby and Summarize as shown in this example here where we computed the median weekly working hours over all years for every country. The result of this is a table which you are going to style in the later parts of this course where you will compile a nice report of your findings. Now it's your turn.