Description Usage Arguments Details Value Examples
This function takes in a dataset with countries as cases. Provide the country name as a three-letter iso_a3 or any common name for the country (e.g. Canada, Fiji).
1 | makeWorldMap(data, varname.x)
|
data |
A dataset with countries as cases |
varname.x |
The variable name for the column that holds the countries names |
It standardizes the country names and merges it another dataset which includes geographic coordinates for each country. It returns a ggplot map with no layers. It prints a message indicating how many countries will not be plotted because no latitude / longitude data was found.
A ggplot map object with no layers.
1 2 3 4 5 6 | ## Not run:
somedat <- CIAdata(2001) # 2001 codes for GDP
p <- makeWorldMap(somedat,'country')
p + geom_polygon(col="blue",aes(fill=GDP))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.