npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

malawi-districts

v2.0.0

Published

A geospatial & socio-economic dataset of Malawi districts with poverty, population, and coordinates.

Downloads

107

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-districts

Quick 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 / lng centroid coordinates for each district.
  • Socio-economic: poverty (MPI %) and population (2018 PHC Census) fields.
  • Administrative classification: type (City / District) and class (Urban / Rural).
  • Neighbor relationships: neighbors lists 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