day03b <- ggplot() +
geom_sf(data = ocean, fill = pal$sea, colour = NA) +
geom_sf(data = admin_lines, colour = pal$line, linewidth = 0.6) +
geom_sf(data = somalia_border, colour = shade(wfp[["navy"]], 0.55), linewidth = 0.7) +
# land cover, no outlines so the patchwork of fields shows
geom_sf(data = landcover, aes(fill = class), colour = NA) +
# the rivers: a navy line inside a white casing, visible on every colour
geom_sf(data = rivers, colour = "white", linewidth = 1.6, lineend = "round") +
geom_sf(data = rivers, colour = wfp[["blue"]], linewidth = 0.7, lineend = "round") +
scale_fill_manual(values = deframe(select(classes, class, colour)), guide = "none") +
# towns
geom_point(data = towns, aes(x, y), shape = 21, size = 1.9, fill = "white", colour = pal$ink, stroke = 0.6) +
geom_label(data = towns, aes(x + nx, y, label = town, hjust = hjust),
family = font, size = 3.4, colour = pal$ink, fill = alpha("white", 0.75),
label.size = 0, label.r = unit(0.1, "lines"), label.padding = unit(0.12, "lines")) +
# region names: small, spaced navy capitals
geom_text(data = regions, aes(x, y, label = label),
family = font, size = 2.6, fontface = "bold", colour = shade(wfp[["navy"]], 0.35)) +
# river names, curved along the rivers
geom_text(data = bind_rows(juba_label, shabelle_label), aes(x, y, label = label, angle = angle),
family = font, fontface = "bold.italic", size = 4.2, colour = "white") +
# title block, top left over empty land
annotate("text", x = xlim[1] + W * 0.04, y = ylim[2] - H * 0.035, hjust = 0, vjust = 1,
label = "Riverine Landcover", family = font, fontface = "bold", size = 8.5, colour = pal$ink) +
annotate("text", x = xlim[1] + W * 0.04, y = ylim[2] - H * 0.09, hjust = 0, vjust = 1, lineheight = 1.2,
label = sprintf(paste0(
"Land cover in Somalia's Juba and Shabelle River, 2007\n",
"%.1f million hectares: %d%% bush and woodland, %d%% rainfed farms.\n",
"Only %d%% is farmed with river water."),
total_ha / 1e6, round(wood_s * 100), round(rainfed_s * 100), round(water_ha / total_ha * 100)),
family = font, size = 3.6, colour = pal$ink) +
# legend: area bar, then the classes
annotate("text", x = lx0, y = ly + H * 0.022, hjust = 0, label = "Share of the mapped area",
family = font, size = 3.6, colour = pal$ink, fontface = "bold") +
annotate("rect", xmin = legend_bar$x0, xmax = legend_bar$x1, ymin = ly - H * 0.006, ymax = ly + H * 0.008,
fill = legend_bar$colour, colour = NA) +
annotate("rect", xmin = lx0, xmax = lx0 + W * 0.022, ymin = legend_rows$y - H * 0.0065,
ymax = legend_rows$y + H * 0.0065, fill = legend_rows$colour) +
annotate("text", x = lx0 + W * 0.035, y = legend_rows$y, hjust = 0, label = legend_rows$label,
family = font, size = 3.4, colour = pal$ink) +
# footnote, at the bottom right over the sea, with space below the legend
annotate("text", x = lx0, y = ylim[1] + H * 0.018, hjust = 0, vjust = 0, lineheight = 1.15,
label = paste0("#30DayMapChallenge 2026 | Day 3: Polygons\n",
"Data: FAO SWALIM, Landcover of Riverine Areas (2007)\n\n"),
family = font, size = 2.9, colour = pal$muted) +
coord_sf(crs = crs_utm, datum = NA, xlim = xlim, ylim = ylim, expand = FALSE) +
theme_void() +
theme(plot.background = element_rect(fill = "white", colour = NA),
plot.margin = margin(0, 0, 0, 0))
day03b