World population infographic with R

[Total: 2   Average: 4.5/5]

R is not just for statistical analysis and data mining, it can also be employed to prepare nice infographics. Here is a quick example of infographic with R.

With few lines of R code we can create, starting from commonly available data, an infographic showing the relative magnitude of the population for the different countries around the world, with the country name placed on the country centroid (like it would be on a map) and the font size proportional to the population size. Simple but impactful!

World population infographic


Here is the R code to produce the infographic above.

The comment in the source code shows the source for the used data. Note that after downloading the data you need to remove the comment lines from it before importing into R.

By default the output is sent to a PDF file, which can be imported for further editing into InkScape or Adobe Illustrator. You can download it from the link below.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.