rnaturalearth
sf
ggplot
leaflet
plotly
ne_countries
library(rnaturalearth) # natural earth data library(ggplot2) # beautiful maps library(dplyr) # data wrangling library(sf) # simple (spatial) features
ne_countries <- ne_countries(scale = "medium", returnclass = "sf")
ggplot(ne_countries) + geom_sf(aes(fill = income_grp)) + scale_fill_viridis_d(name = "Income Group", option = "viridis") + labs(title = "Countries of the World") + theme_minimal()