rwanda-geo-structure
v1.3.9
Published
Rwanda Geo Structure is a JavaScript app that simplifies obtaining local Rwandan administrative divisions. It allows developers to enable users to select divisions like province, district, sector, cell, and village, streamlining the collection of location
Downloads
48
Readme
Rwanda Geo Structure
Rwanda Geo Structure is a comprehensive JavaScript package that provides easy access to Rwanda's administrative divisions. It allows developers to retrieve and work with data about provinces, districts, sectors, cells, and villages in Rwanda, streamlining the process of collecting and managing location-based data for applications focused on Rwanda.
Table of Contents
Installation
To install the Rwanda Geo Structure package, run the following command in your project directory:
npm install rwanda-geo-structure
or if you're using Yarn:
yarn add rwanda-geo-structure
Usage
Import the functions you need:
import { getProvinces, getDistrictsByProvince } from "rwanda-geo-structure";
Documentation
For detailed usage instructions, examples, and API reference, please visit our comprehensive documentation:
Rwanda Geo Structure Documentation
Available Functions
Here's a summary of the available functions in the rwanda-geo-structure package:
- getCountry(): Returns the country name (always "Rwanda").
- getProvinces(): Retrieves all provinces in Rwanda.
- getDistricts(): Retrieves all districts in Rwanda.
- getDistrictsByProvince(province): Retrieves all districts within a specified province.
- getSectors(): Retrieves all sectors in Rwanda.
- getSectorsByDistrict(province, district): Retrieves all sectors within a specified district.
- getCells(): Retrieves all cells in Rwanda.
- getCellsBySector(province, district, sector): Retrieves all cells within a specified sector.
- getVillages(): Retrieves all villages in Rwanda.
- getVillagesByCell(province, district, sector, cell): Retrieves all villages within a specified cell.
- getRandomLocation(): Generates a random location in Rwanda.
- countLocations(): Counts the number of administrative divisions at each level in Rwanda.
For detailed explanations, parameters, return values, and usage examples, please refer to our documentation.
Authors
Contributing
Contributions to the Rwanda Geo Structure package are welcome! Here are some ways you can contribute:
- Report bugs or request features by opening an issue.
- Submit pull requests to fix bugs or add new features.
- Improve documentation or add usage examples.
Please ensure that your code adheres to the existing style and that all tests pass before submitting a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
For more information or support, please open an issue on the GitHub repository.