Description Usage Arguments Value
Choropleth map of the world on country level
1 2 |
dat |
tibble, containing country (2-letter country codes, or 3-letter codes, depending on country_nchar), numeric variable(s) to be plotted and label (to be shown in hoverlabel) |
return_df |
#Boolean, whether to return table of results in addition to a plot (as a list) |
vars |
vector of variables to include, possibly named. If more than one, will add layer control, using vector names. |
country_nchar |
2 or 3, how to interpret the country values in dat: as 2- or 3-letter codes |
map_provider |
provider of maptiles (see leaflet documentation). NULL will use leaflet default. |
leaflet object, or a list of a leaflet object and a tibble, depending on return_df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.