library(tidyverse)
library(sf)
library(scico)
Overview
Astonishing World Map
projection: projection_bonne
. Data is from the {rnaturalearth}
package.
# set the fonts
library(showtext)
library(sysfonts)
library(extrafont)
::showtext_auto()
showtext::showtext_opts(dpi=320)
showtextfont_add_google(name="Patrick Hand",
family="Patrick Hand")
<- c("+proj=bonne +lat_1=10")
projection_bonne
<- sf::st_graticule(lon=seq(-180,180, 15),
world_graticule lat = seq(-90,90, 7.5),
ndiscr = 5000,
margin = 0.00000000001) %>%
st_transform(projection_bonne)
<- rnaturalearth::ne_countries(returnclass = "sf") world_pol
ggplot() +
geom_sf(data = world_graticule,
linewidth = 0.1,
color = "white",
alpha = 0.6) +
geom_sf(data=world_pol,aes(fill=economy))+
coord_sf()+
::scale_fill_scico_d(direction = -1)+
scicolabs(fill="Economy",
caption = "#30DayMapChallenge2022 Day 24: Fantasy\nDataSource: {rnaturalearth} & proj=bonne | Map: Federica Gazzelloni (@fgazzelloni)") +
::theme_map()+
ggthemestheme(text=element_text(color="navy",family="Patrick Hand"),
plot.background = element_rect(fill="#a8bd3a",color="grey80"),
plot.caption = element_text(size=5,lineheight = 1.1),
legend.key.size = unit(7,units="pt"),
legend.position = c(0,-0.1),
legend.text = element_text(color="navy",size=6),
legend.title = element_text(color="navy"),
legend.background = element_blank())
ggsave("day24_fantasy.png",
width = 5.42,
height = 3.2)