Description Usage Arguments Value References Examples
Create a country-level choropleth using data from the World Bank's World Development Indicators (WDI).
1 2 | choroplethr_wdi(code = "SP.POP.TOTL", year = 2012, title = "",
buckets = 7, zoom = NULL)
|
code |
The WDI code to use. |
year |
The year of data to use. |
title |
A title for the map. If not specified, automatically generated to include WDI code and year. |
buckets |
The number of equally sized buckets to places the values in. A value of 1 will use a continuous scale, and a value in [2, 9] will use that many buckets. |
zoom |
An optional list of countries to zoom in on. Must come from the "name" column in ?country.regions. |
A choropleth.
Uses the WDI function from the WDI package by Vincent Arel-Bundock.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# See http://data.worldbank.org/indicator/SP.POP.TOTL
choroplethr_wdi(code="SP.POP.TOTL", year=2012, title="2012 Population Estimates", buckets=1)
# See http://data.worldbank.org/indicator/SP.DYN.LE00.IN
choroplethr_wdi(code="SP.DYN.LE00.IN", year=2012, title="2012 Life Expectancy Estimates")
# See http://data.worldbank.org/indicator/NY.GDP.PCAP.CD
choroplethr_wdi(code="NY.GDP.PCAP.CD", year=2012, title="2012 Per Capita Income")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.