Show the code
library(rnaturalearth) # natural earth data
library(ggplot2) # beautiful maps
library(dplyr) # data wrangling
library(sf) # simple (spatial) featuresrnaturalearthrnaturalearth is a source library for data various types of global mapping data.
library(rnaturalearth) # natural earth data
library(ggplot2) # beautiful maps
library(dplyr) # data wrangling
library(sf) # simple (spatial) featuresmapdata As sfne_countries stands for Natural Earth Countries.
I use ne_countries() to create the mapdata dataset as an sf object (Chapter 7).
mapdata <- ne_countries(scale = "medium", # medium scale
                        returnclass = "sf") # as sf objectI make a simple map of this sf object with ggplot (Chapter 14).