Map projections with R
Issue 1 of 3
Issues: Map projections with R
Do you know the Bonne Projection? This is a very special one, as it produces this result when used to map the whole world. Happy Valentine’s Day!
library(sf)
library(dplyr)
library(giscoR)
library(ggplot2)
library(showtext)
world <- gisco_get_countries()
# Shaped ocean
h_earth <- world %>%
# Fine grid
st_make_grid(n = c(50, 50)) %>%
# Bonne projection
st_transform("ESRI:54024") %>%
# To sf object (data-frame like)
st_sf(couple = 2, someval = 1, .)
# And finally
font_add_google(name = "Emilys Candy", family = "emilys")
showtext_auto()
ggplot() +
geom_sf(data = h_earth, fill = "#f9b7bb", color = "#f9b7bb") +
geom_sf(data = world, fill = "#d24658", color = "#d24658") +
theme_void() +
labs(
title = "Happy Valentine's Day",
caption = "Bonne Projection (ESRI:54024)"
) +
theme(
plot.background = element_rect(
fill = "#faddcf",
color = "transparent"
),
text = element_text(family = "emilys", colour = "#d24658"),
plot.title = element_text(hjust = 0.5, size = rel(3)),
plot.caption = element_text(hjust = 0.5, size = rel(2))
)

How to cite this post
For attribution, please cite this work as:
Hernangómez, D. (2025, February 17). Happy Valentine’s Day. One World. https://dieghernan.github.io/202502_st_valentine/
BibTeX
@misc{post20250217-st-valentine,
author = {Hernangómez, Diego},
title = {Happy Valentine’s Day},
year = {2025},
month = feb,
howpublished = {One World},
url = {https://dieghernan.github.io/202502_st_valentine/},
}