worldplot {WorldMapR} | R Documentation |
worldplot
Description
Plot a world heat map based on a continuous variable.
Usage
worldplot(
data,
ColName,
CountryName,
CountryNameType = "isoa2",
rangeVal,
longitude = c(-180, 180),
latitude = c(-90, 90),
title = "",
legendTitle = as.character(ColName),
annote = FALSE,
div = 1,
palette_option = "D",
save = FALSE,
filename = "worldplot.jpg",
path = tempdir(),
width = 20,
height = 10,
units = "cm",
scale = 1
)
Arguments
data |
Data set containing the list of nations and the variable that we want to plot. |
ColName |
Character variable with the name of the variable of interest. |
CountryName |
Character variable with the name of the country names column. |
CountryNameType |
Character variable with the coding for |
rangeVal |
Limit values that are to be defined for the map. |
longitude |
Longitude limits. Default is |
latitude |
Latitude limits. Default is |
title |
Title of the plot. Default is no title. |
legendTitle |
Title of the legend. Default is the name of the filling variable. |
annote |
Do you want to plot country labels (ISO 3166-1 alpha-2 code) on the map? Default is set to |
div |
Parameter for modifying the elements dimensions in the map. Usually, it does not need to be modified. Default value is 1. |
palette_option |
Character string indicating the palette to be used. Available options range between "A" and "H". |
save |
Save the plot in a jpg file? |
filename |
Only if is save set to |
path |
Only if save is set to |
width |
Only if save is set to |
height |
Only if save is set to |
units |
Only if save is set to |
scale |
Only if save is set to |
Value
a map
Examples
data(testdata1b)
worldplot(data = testdata1b,
div = 1,
ColName = "VNum",
CountryName = "Cshort",
CountryNameType = "isoa2",
rangeVal = c(0,50),
annote = FALSE)