Last call! Check what courses we have in our offer, and get them all here to save $727 (only hours left.)
Introduction to data frames
Data frame structure
Accessing columns in a data frame
Accessing rows and columns combined in a data frame
Data frame analysis
25. Numeric column visualization - histograms


Well done! Of course, you can also visualize data that are stored in each column. For numeric values, you can use histograms. Recall that you can draw a histogram using hist(). We'll use the dollar sign ($) to specify the column we wish to visualize:


This will display a histogram of population values to the output console:


As you can see from the picture, most of the candidate cities have less than one million inhabitants, but there are still some outliers that are heavily populated (like Paris and Berlin).


What does the distribution look like for country populations? Given that population values are stored for each country in the population column of the countries data frame, display a histogram of that population data.

Stuck? Here's a hint!

Use the hist() function on the population column from the countries data frame.