Logo Lanfrica

aine1100/Rwanda_Locations

Domain:

geospatialdigital infrastructure

Record type:

software
Creator:
ain
Host:
this is data about rwanda's province,district,cells,sectors,villages in kinyarwanda # Rwanda Location API A simple RESTful API serving detailed location data for Rwanda, including provinces, districts, sectors, cells, and villages. Ideal for apps needing hierarchical geographic data for Rwanda. --- ## Features * Retrieve all location data * Get a list of all provinces * Fetch districts by province * Fetch sectors by province and district * Fetch cells by province, district, and sector * Fetch villages by province, district, sector, and cell --- ## Getting Started ### Prerequisites * Node.js (v14+ recommended) * npm or yarn ### Installation 1. Clone the repository ```bash git clone github.com cd rwanda-location-api ``` 2. Install dependencies ```bash npm install # or yarn install ``` 3. Create a `.env` file (optional) to set your PORT or other env variables: ``` PORT=3000 ``` 4. Start the server ```bash npm start # or yarn start ``` --- ## API Endpoints ### Base URL ``` localhost ``` ### Endpoints * `GET /` Get the full nested location data * `GET /provinces` Get a list of all provinces in Rwanda * `GET /province/:province/districts` Get districts in a specific province * `GET /province/:province/district/:district/sector` Get sectors in a specific district and province * `GET /province/:province/district/:district/sector/:sector/cells` Get cells in a specific sector, district, and province * `GET /province/:province/district/:district/sector/:sector/cell/:cell/villages` Get villages in a specific cell, sector, district, and province --- ## Example Requests Get all provinces: ```bash curl localhost ``` Get districts in the "amajyepfo" province: ```bash curl localhost ``` Get sectors in "nyanza" district of "amajyepfo" province: ```bash curl localhost ``` --- ## Project Structure ``` ├── co …