Skip to content

Instantly share code, notes, and snippets.

@dakvid
Created November 21, 2021 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dakvid/72f5a1b16e492560f892bff67ee7232c to your computer and use it in GitHub Desktop.
Save dakvid/72f5a1b16e492560f892bff67ee7232c to your computer and use it in GitHub Desktop.
#30DayMapChallenge 2021 - Day 29 - NULL
# A map without New Zealand, centred on New Zealand
# And let's use a Lambert azimuthal equal-area projection for fun
# For #30DayMapChallenge 2021 - Day 29 - NULL
# -- David Friggens, November 2021
library(rnaturalearth)
library(sf)
library(dplyr)
library(ggplot2)
library(hrbrthemes)
FONT <- "Baloo"
world <-
ne_countries(scale = "medium",
returnclass = "sf") %>%
filter(admin != "New Zealand")
world_lamb <-
world %>%
st_transform(crs = "+proj=laea +x_0=0 +y_0=0 +lon_0=174 +lat_0=0")
gg <-
ggplot(world_lamb) +
geom_sf() +
coord_sf(datum = NA) +
labs(title = "Another map without New Zealand",
subtitle = "#30DayMapChallenge - Day 29 - NULL",
caption = "David Friggens @dakvid") +
theme_ft_rc() +
theme(plot.title = element_text(family = FONT, size = 72),
plot.subtitle = element_text(family = FONT, size = 48),
plot.caption = element_text(family = FONT, size = 32))
ggsave(plot = gg,
path = "Day_29",
filename = "Day_29_null_NZ.png",
device = "png",
width = 30, height = 30, dpi = 72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment