knowbee / murwanda

🇷🇼Find place codes by code, province, district, sector, cell or village name from Rwanda

Home Page:https://www.npmjs.com/package/murwanda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

murwanda

Build Status npm Dependency Status npm Open Source Love Open Source Love

murwanda is an alternative to rwanda, with this package you get access to place codes for all locations(provinces,districs,sectors,cells,villages) from Rwanda

Install

npm install murwanda

or

yarn add murwanda

Example

const { PlaceCodesByProvince, PlaceCodesByCode } = require("murwanda");

console.log(PlaceCodesByProvince("South"));
console.log(PlaceCodesByCode("102130307")) // 102130307 : village code
// [
// {
//     province_code: '1',
//     province_name: 'Kigali City',
//     district_code: '102',
//     district_name: 'Gasabo',
//     sector_code: '010213',
//     sector_name: 'Remera',
//     cell_code: '1021303',
//     cell_name: 'Rukiri I',
//     village_code: '102130307',
//     village_name: 'Urumuri'
//   }
// ]

Usage

const { PlaceCodesByProvince, PlaceCodesByDistrict, PlaceCodesBySector, PlaceCodesByCell, PlaceCodesByVillage, PlaceCodesByCode } = require("murwanda");

All inputs are case-insensitive.

Methods

PlaceCodesByProvince(province)

Returns array of all places(province, districts, sectors, cells, villages) and their respective codes from the given province.

PlaceCodesByDistrict(province, district)

Returns array of all places(province, district, sectors, cells, villages) and their respective codes from the given district.

PlaceCodesBySector(province, district, sector)

Returns array of all places(province, district, sector, cells, villages) and their respective codes.

PlaceCodesByCell(province, district, sector, cell)

Returns array of all places(province, district, sector, cell, villages) and their respective codes.

PlaceCodesByVillage(province, district, sector, cell, village)

Returns array of all places(province, district, sector, cell, village) and their respective codes.

PlaceCodesByCode(code)

Returns array of all places(province, district, sector, cell, village) and their respective codes.

Contribution

License

MIT

Author

Igwaneza Bruce

About

🇷🇼Find place codes by code, province, district, sector, cell or village name from Rwanda

https://www.npmjs.com/package/murwanda


Languages

Language:JavaScript 100.0%