malawi-districts
v2.0.0
Published
A geospatial & socio-economic dataset of Malawi districts with poverty, population, and coordinates.
Downloads
107
Maintainers
Readme
Malawi Districts
A geospatial + socio-economic dataset of Malawi districts, including GPS centroids, poverty metrics, population totals (2018 PHC census), and neighbor relationships.
Installation
npm install malawi-districtsQuick Start
const malawi = require('malawi-districts');
// full dataset
const all = malawi.all;
// capital district
const capital = malawi.getCapital();
// districts by poverty tier
const highPoverty = malawi.getByPovertyLevel('high');
// population totals
const southernPop = malawi.getTotalPopulation('Southern');
// neighbors for a district
const neighbors = malawi.getNeighbors('Blantyre City');
// fuzzy search by name or region
const search = malawi.search('Mangochi');New Features (v2.0.0)
- Geospatial:
lat/lngcentroid coordinates for each district. - Socio-economic:
poverty(MPI %) andpopulation(2018 PHC Census) fields. - Administrative classification:
type(City/District) andclass(Urban/Rural). - Neighbor relationships:
neighborslists adjacent districts. - New query helpers:
getCapital()— returns the capital district object.getByPovertyLevel('low'|'medium'|'high')— poverty-tier filtering.getTotalPopulation(region?)— population sums by region or nationwide.getNeighbors(name)— returns the border districts for a given district.search(query)— fuzzy search by district name or region.
API
malawi.all
All districts as an array of objects.
malawi.getCapital()
Returns the district object where isCapital === true.
malawi.getByPovertyLevel(level)
low: poverty < 30%medium: 30%–60%high: > 60%
malawi.getTotalPopulation(region)
Returns total population for a region (Northern, Central, Southern) or the entire country when no region is provided.
Data Sources
Data in this package is compiled from the following sources:
- NSO Malawi – Multidimensional Poverty Index (MPI) and socio-economic data.
- 2018 Population and Housing Census (PHC) – population totals.
- UN OCHA – centroid coordinates (latitude/longitude) from Malawi administrative boundary datasets.
License
MIT
