Plot DHS Indicator as Choropleth Map
plot_dhs_map.RdCreates choropleth maps of DHS indicator data at Admin 1 level across Sub-Saharan Africa using tmap.
Arguments
- panel
Dataframe from
cascade_to_admin1().- admin1_geo
sf object from
get_admin1_geo(). If NULL, fetched automatically.- var
Character string of variable to plot.
- years
Integer vector of years to plot. If NULL, uses most recent.
- title
Optional custom title. If NULL, uses DHS variable label.
- palette
Character: tmap/viridis palette (default: "viridis").
- n_breaks
Integer: number of legend breaks (default: 7).
- breaks
Optional custom breaks vector.
- bb_x
Numeric vector of longitude limits (default: Africa extent).
- bb_y
Numeric vector of latitude limits (default: Africa extent).
- basemap
Logical: draw country borders (default: TRUE).
- pdf_file
Optional PDF filename for output.