Using ggplot2-like plots
Ggplot2 is an R library for data visualization popular among R users. The main idea of ggplot2 is that the product of data visualization consists of many layers. Like a painter, we start with an empty canvas and then gradually add layers of paint. Usually, we interface with R code from Python with rpy2 (I will discuss several interoperability options in Chapter 11, of my book Python Data Analysis). However, if we only want to use ggplot2, it is more convenient to use the pyggplot library. In this recipe, we will visualize population growth for three countries using Worldbank data retrievable through pandas. The data consists of various indicators and related metadata. The spreadsheet at http://api.worldbank.org/v2/en/topic/19?downloadformat=excel ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access