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

ethiopia-geo-boundaries

v3.0.7

Published

Vanilla SVG generator for Ethiopian administrative boundaries (ADM1-ADM3). Zero runtime dependencies.

Downloads

861

Readme

ethiopia-geo-boundaries v2

Fully offline administrative boundary data for Ethiopia.
Zero network calls · Works forever · Vue 3 / Nuxt 3 ready Features: Interactive drill-down (Region -> Zone -> Woreda), highly accessible, and handles contested borders cleanly.

🌍 Region Level

Region Map Demo

📍 Zone Level

Zone Map Demo

🏠 Woreda Level

Woreda Map Demo

🏠 Zone Level As a whole

Woreda Map Demo

Install

npm install ethiopia-geo-boundaries d3

Live Demo & Example App

Live Demo: map-et.vercel.app

Example App Repo: HabtamuTesafaye/map_et


What's included

| File | Contents | |------|----------| | data/eth-adm0.json | Country outline GeoJSON | | data/eth-adm1.json | 14 regions GeoJSON (Natural Earth, public domain) with Contested area correctly mapped | | data/hierarchy.json | 14 regions + zones with PCodes, names, Amharic, capitals, populations | | vue/EthiopiaMap.vue | Vue 3 / Nuxt 3 choropleth map component | | scripts/convert-hdx.js | Convert HDX COD-AB shapefile → zone/woreda GeoJSON |

ADM2/ADM3 geometry: Zone and woreda polygons require the HDX COD-AB shapefile (manual download from humdata.org). Run node scripts/convert-hdx.js after placing the shapefile in ./input/.


Usage

Install

npm install ethiopia-geo-boundaries d3

SVG Paths (ADM1–ADM3)

Import pre-built SVG path strings keyed by P-code:

import { adm1Paths, adm1PathsNames } from 'ethiopia-geo-boundaries/adm1'
import {
  adm2Paths, adm2PathsParents, adm2PathsNames,
} from 'ethiopia-geo-boundaries/adm2'
import {
  adm3Paths, adm3PathsParents, adm3PathsNames,
} from 'ethiopia-geo-boundaries/adm3'
  • adm1Paths / adm2Paths / adm3PathsRecord<string, string> of P-code → SVG d attribute
  • adm1PathsNames / adm2PathsNames / adm3PathsNamesRecord<string, string> of P-code → human-readable name
  • adm2PathsParents / adm3PathsParentsRecord<string, string> of child P-code → parent name

Render SVG string

import { renderEthiopiaMap } from 'ethiopia-geo-boundaries'

const svg = renderEthiopiaMap(adm1Paths, {
  colors: { ET04: '#ff0000', ET03: '#00ff00' },
  size: 700,
  stroke: '#1e293b',
  strokeWidth: 1.2,
})

Then render with v-html (Vue) or innerHTML (vanilla JS).

Map Options (MapOptions)

| Option | Type | Default | Description | |--------|------|---------|-------------| | values | Record<string, number> | {} | Numeric data keyed by P-code for choropleth | | colors | Record<string, string> | {} | Explicit hex colors per P-code (overrides values + palette) | | palette | 'blue' \| 'green' \| 'orange' \| 'red' \| 'purple' | 'blue' | Color palette for choropleth | | size | number | 800 | SVG canvas size | | classPrefix | string | 'eth-geo' | CSS class prefix for path elements | | stroke | string | '#ffffff' | Stroke color | | strokeWidth | number | 0.5 | Stroke width | | showLegend | boolean | false | Render legend inside SVG | | legendLabels | [string, string] | ['Low', 'High'] | Legend labels |

Matching names to P-codes

Use the names dictionaries to look up P-codes:

import { adm1PathsNames, adm2PathsNames } from 'ethiopia-geo-boundaries/adm1' // or /adm2

// Find P-code for a name
const pcode = Object.keys(adm1PathsNames).find(k => adm1PathsNames[k] === 'Oromia')

Region P-codes

| P-code | English | Amharic | Capital | |--------|---------|---------|---------| | ET01 | Tigray | ትግራይ | Mekelle | | ET02 | Afar | አፋር | Semera | | ET03 | Amhara | አማራ | Bahir Dar | | ET04 | Oromia | ኦሮሚያ | Addis Ababa | | ET05 | Somali | ሶማሌ | Jijiga | | ET06 | Benishangul-Gumuz | ቤኒሻንጉል-ጉምዝ | Asosa | | ET07 | Central Ethiopia | ማዕከላዊ ኢትዮጵያ | Hosaina | | ET08 | South Ethiopia | ደቡብ ኢትዮጵያ | Arba Minch | | ET11 | South West Ethiopia | ደቡብ ምዕራብ | Bonga | | ET12 | Gambela | ጋምቤላ | Gambela | | ET13 | Harari | ሐረሪ | Harar | | ET14 | Addis Ababa | አዲስ አበባ | Addis Ababa | | ET15 | Dire Dawa | ድሬዳዋ | Dire Dawa | | ET16 | Sidama | ሲዳማ | Hawassa |