library(ramptools)
library(sf)
## Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
library(ramp.uganda)
attach(yaml::read_yaml("../my_paths.yaml")) 

This creates a file called abim_icon.png

png("../outputs/abim_icon.png", width=480, height=520) -> out
shade_district("Abim District")
dev.off(dev.cur()) -> out

This is abim_icon.png
This is abim_icon.png

This creates the icons for all districts in the local directories:

for(i in 1:146){
   district <- district_dir[i,1]
   dir <- district_dir[i,2]
   icon_name = paste(website_dir, dir, "/", dir, "_icon.png", sep="")
   png(icon_name, width=480, height=520)
   shade_district(district)
   dev.off(dev.cur())
}