Know your problem
Know your data
4. Look at your data
Visualize your data – numerical variables
Work with your chart
Check yourself


Now let's examine the data we will use. This time, we will use data from the WHO's GISAH site and from the World Bank Group, an international financial institution that aims to reduce global poverty.

The variables we will use are in the dataset called alcohol_wealth. This dataset contains observations for 169 countries [1] for 2010. There are three variables:

  • country - The name of the country,
  • consumption - The number of liters of pure alcohol consumed per adult,
  • wealth_index - An indicator of the wealth of the country, per the World Bank [2].

1. We include only countries that a) had data available in 2010, and b) have no official ban on alcohol use.
2. Strictly speaking, wealth_index is a logarithm of the Gross National Income indicator, measured in current international dollars per capita. Further details are available on this site.


We know what variables we can expect in our dataset. Nevertheless, it is always valuable to see a sample of the real data.

Select the first ten observations from the alcohol_wealth dataset and look at them.

To do that use the head(dataset, number) function with two arguments: the name of the dataset and the desired number of rows.

When you're done, press Run and Check Code to check your code.

Stuck? Here's a hint!

You should write:

head(alcohol_wealth, 10)