Skip to main content

A package for working with Rwandan location metadata, including provinces, districts, sectors, cells, and villages.

Project description

Rwanda Locations

rwanda_locations is a Python package designed to provide easy access to Rwandan location metadata. This includes hierarchical data from provinces down to villages, as well as various utility functions to retrieve and manipulate this data.

Features

  • Retrieve provinces
  • Retrieve districts within a specific province
  • Retrieve sectors within a specific district
  • Retrieve cells within a specific sector
  • Retrieve villages within a specific cell
  • Get all child locations for a given level of hierarchy

Installation

You can install the package using pip. If you're installing from a local directory, navigate to the directory containing setup.py and run:

pip install .
# As the package is established by PyPI, you can install it using:
pip install rwanda_locations

Usage

Here’s how to use the package in your Python application:

from rwanda_locations.data import (
    get_provinces, get_districts_from_province, get_sectors_from_district,
    get_cells_from_sector, get_villages_from_cell, get_all_children
)

# Get all provinces
provinces = get_provinces()
print("Provinces:", provinces)

# Get districts in a specific province
districts = get_districts_from_province('East')
print("Districts in East Province:", districts)

# Get sectors in a specific district - For example: Nyagatare District
sectors = get_sectors_from_district('East', 'Nyagatare')
print("Sectors in Nyagatare District:", sectors)

# Get cells in a specific sector - For example: Nyagatare Sector
cells = get_cells_from_sector('East', 'Nyagatare', 'Nyagatare')
print("Cells in Nyagatare Sector:", cells)

# Get villages in a specific cell - For example: Barija Cell
villages = get_villages_from_cell('East', 'Nyagatare', 'Nyagatare', 'Barija')
print("Villages in Barija Cell:", villages)

# Get all children based on hierarchy level
children = get_all_children(province='East', district='Nyagatare', sector='Nyagatare')
print("Children in Nyagatare Sector:", children)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to open issues and submit pull requests to improve the package. Your contributions are welcome!

Contact

For any questions or feedback, please contact Fredson Gisa Kaze at fredson.coder@gmail.com

Acknowledgements

Thank you for using rwanda_locations. We hope it helps you efficiently work with Rwandan location data!

Changelog

1.0

  • initial release
  • province names and other entities up-to villages(Imidugudu)
  • lookup() method
  • shapefile URLs for various regions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rwanda_locations-1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rwanda_locations-1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file rwanda_locations-1.0.tar.gz.

File metadata

  • Download URL: rwanda_locations-1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rwanda_locations-1.0.tar.gz
Algorithm Hash digest
SHA256 6122d70042cb82ed3219e94832aa3a202d4253a685ab3bd1623e28b4f1f77c1c
MD5 8b33fbab6d1fd0fdcf022db9adb1f3c3
BLAKE2b-256 f21e6c351a7604e6428697eb8556f5e11355653eeb81c7ae07fa82e86e457cf1

See more details on using hashes here.

File details

Details for the file rwanda_locations-1.0-py3-none-any.whl.

File metadata

  • Download URL: rwanda_locations-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rwanda_locations-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a60c9e1d52ed0bac5b66dfdbaa77917715cbe4957178351aefa602f15c1c8de
MD5 4c64d89b9924d5b6a26f4a5507edeb5c
BLAKE2b-256 eb8edb2b7f5a4b7ec4b550997ee8df736c6dc111bee57cd2eaaefd28e6899d41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page