Logo Lanfrica

theodevrwanda/locationinrwanda

Domaine:

geospatial

Type de record:

software
Créateur:
the
Hôte:
A lightweight, zero-dependency TypeScript package providing 100% complete administrative division data for Rwanda. Built for seamless cascading dropdowns (Province ➔ District ➔ Sector ➔ Cell ➔ Village) in modern web applications. Created and Maintained by Theogene Iradukunda. # Location in Rwanda (`locationInRwanda.ts`) 🇷🇼 A lightweight, zero-dependency TypeScript package providing 100% complete administrative division data for **Rwanda**. Built for seamless cascading dropdowns (Province ➔ District ➔ Sector ➔ Cell ➔ Village) in modern web applications. Created and Maintained by **Theogene Iradukunda**. --- ## 📌 Repository Overview This repository provides a single, self-contained TypeScript file (`locationInRwanda.ts`) that maps every single administrative level in Rwanda without needing external API calls or `.json` files. --- ## 📊 Dataset Statistics | Administrative Division | Total Count | Coverage | | :--- | :--- | :--- | | **Provinces** | **5** | City of Kigali, Southern, Western, Northern, Eastern | | **Districts** | **30** | 100% of all Rwanda Districts | | **Sectors** | **379** | 100% of all Rwanda Sectors | | **Cells** | **1,467** | 100% of all Rwanda Cells | | **Villages** | **14,631+** | 100% of all Rwanda Villages | --- ## 📁 Package Structure ``` location/ ├── README.md # Documentation & Usage Guide └── locationInRwanda.ts # Single TypeScript dataset file (No JSON required) ``` --- ## 🚀 How to Use ### Cascading Location Dropdowns (React / TypeScript / Vite / Next.js) Import the exported data objects directly from `./locationInRwanda`: ```typescript import { PROVINCES, DISTRICTS_BY_PROVINCE, SECTORS_BY_DISTRICT, CELLS_BY_SECTOR, VILLAGES_BY_CELL } from "./locationInRwanda"; // 1. Get all Provinces console.log(PROVINCES); // -> ["City of Kigali", "Southern Province", "Western Province", "Northern Province", "Eastern Province"] // 2. Get Districts for a Province const kigaliDistricts = DISTRICTS_BY_PROVINCE["City of Kigali"]; // -> ["Gasabo", "Kicukiro", "Nyarugenge"] const southernDistricts = DISTRICTS_BY_PROVINCE["Southern Province"]; // -> ["Gisagara", "Huye", "Kamonyi", "Muhanga", "Nyamagabe", "Nyanza", "Nyaruguru", "Ruhango"] // 3. Get Sectors for a District const gasaboSectors = SECTORS_BY …

Languages