mwmapdata

mwmapdata provides official spatial boundary datasets for Malawi, for use with the mwmap package or any spatial analysis workflow requiring Malawi administrative boundaries.

Datasets

Object Level Features Description
mw_level_0 0 1 National boundary
mw_level_1 1 3 Administrative regions (N, C, S)
mw_level_2 2 32 Districts (incl. 4 city districts)
mw_level_3 3 433 Traditional authorities
major_lakes — 1 Lake Malawi / Lake Nyasa
malawi_data 2 32 Legacy alias for mw_level_2 (deprecated)

All levels include area_sqkm, center_lat, and center_lon columns.

Boundary data are the official Common Operational Datasets (COD-AB) sourced from the National Statistics Office of Malawi, distributed via OCHA Humanitarian Data Exchange (HDX), version 02 (valid from 05 April 2023).

Installation

# From CRAN (once available)
install.packages("mwmapdata")

# Development version
# remotes::install_github("bitacanalytics/mwmapdata")
install.packages("mwmapdata", repos = c('https://bitacanalytics.r-universe.dev', 'https://cloud.r-project.org'))

Usage

library(mwmapdata)
library(sf)

# Plot all 32 districts
plot(st_geometry(mw_level_2))

# Plot traditional authorities in a single district
lilongwe_tas <- mw_level_3[mw_level_3$DISTRICT == "Lilongwe", ]
plot(st_geometry(lilongwe_tas))

# Check data validity
mwmapdata_check()

Data notes

License

MIT © Chifundo Bita

Data: Creative Commons Attribution 4.0 International (CC BY 4.0) — National Statistics Office of Malawi / OCHA HDX