choroplethr provides native support for creating choropleths from data from the World Bank’s World Development Indicators (WDI). This functionality is available with the choroplethr_wdi
function (?choroplethr_wdi). You can learn more about the World Development Indicators here.
Here is a choropleth of the population of countries in the world, using a continuous scale. See here for more information on code SP.POP.TOTL.
library(choroplethr) library(WDI) choroplethr_wdi(code="SP.POP.TOTL", year=2012, title="2012 Population", num_colors=1)
Here is a choropleth of the population of countries in the world. See here for more information on code SP.DYN.LE00.IN.
choroplethr_wdi(code="SP.DYN.LE00.IN", year=2012, title="2012 Life Expectancy")
Here is a choropleth of the Per-Capita Income of countries in the world. See here for more information on code NY.GDP.PCAP.CD.
choroplethr_wdi(code="NY.GDP.PCAP.CD", year=2012, title="2012 Per Capita Income")