Logo Lanfrica

Monehin/rwanda-geo

Domain:

geospatial

Record type:

dataset
Creator:
Mon
Host:
Complete, typed, and lightweight dataset of Rwanda's administrative divisions - 5 provinces, 30 districts, 416 sectors, 2,148 cells, and 14,837 villages with simplified codes and coordinates. # Rwanda-Geo πŸ‡·πŸ‡Ό > **Complete, typed, and lightweight dataset of Rwanda's administrative divisions** - Provinces, Districts, Sectors, Cells, Villages. ## ✨ Features - **πŸ—ΊοΈ Complete Administrative Hierarchy**: All 5 provinces, 30 districts, 416 sectors, 2,148 cells, and 14,837 villages - **πŸ” Advanced Search & Navigation**: Fuzzy search, hierarchical traversal, and intelligent suggestions - **πŸ›‘οΈ TypeScript First**: Fully typed with comprehensive interfaces and IntelliSense support - **⚑ High Performance**: Optimized data structures (**~135KB bundle size**) - **🌐 Universal Support**: Works in Node.js, browsers, and modern JavaScript environments - **πŸ”§ Validation Tools**: Built-in data integrity checks and format validation - **πŸ“Š Rich Metadata**: Geographic coordinates, hierarchical relationships, and user-friendly codes - **🎯 Tree-shakable**: Only import what you need to keep your bundle size minimal ## πŸ“¦ Installation ```bash npm install rwanda-geo ``` ```bash yarn add rwanda-geo ``` ```bash pnpm add rwanda-geo ``` ## ⚠️ Important: Server-Side Only **This package is designed for server-side usage only** because it uses Node.js built-in modules (`fs`, `zlib`, `path`) to load data files. It cannot be used directly in client-side applications (React, Vue, browser-based apps). ### βœ… Supported Environments - **Node.js servers** (Express, Fastify, etc.) - **Next.js server components** and API routes - **Nuxt.js server-side** functions - **Deno** (with Node.js compatibility) - **Build-time** data generation ### ❌ Not Supported - **React client components** - **Vue client components** - **Browser-based applications** - **Static site generators** (without server-side processing) ### πŸ”§ Usage Examples #### Next.js Server Components ```tsx // app/locations/page.tsx import { getAllProvinces, getAllDistricts } from 'rwanda-geo'; export default async function LocationsPage() { // This runs on the server where Node.js modules are available const provinces = getAllPro …

Licenses