# 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:
```bash
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:
```bash
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
Raw data
{
"_id": null,
"home_page": "https://github.com/gisakaze/rwanda_locations",
"name": "rwanda-locations",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Fredson Gisa Kaze",
"author_email": "fredson.coder@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3e/23/2a1c6e15981eafaa93a1b324ff93a5a6577c1a5ce1a310025f3bdd349680/rwanda_locations-1.1.tar.gz",
"platform": null,
"description": "# Rwanda Locations\r\n\r\n`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.\r\n\r\n## Features\r\n\r\n- Retrieve provinces\r\n- Retrieve districts within a specific province\r\n- Retrieve sectors within a specific district\r\n- Retrieve cells within a specific sector\r\n- Retrieve villages within a specific cell\r\n- Get all child locations for a given level of hierarchy\r\n\r\n## Installation\r\n\r\nYou can install the package using pip. If you're installing from a local directory, navigate to the directory containing `setup.py` and run:\r\n\r\n```bash\r\npip install .\r\n# As the package is established by PyPI, you can install it using:\r\npip install rwanda_locations\r\n```\r\n\r\n## Usage\r\nHere\u00e2\u20ac\u2122s how to use the package in your Python application:\r\n\r\n```bash\r\nfrom rwanda_locations.data import (\r\n get_provinces, get_districts_from_province, get_sectors_from_district,\r\n get_cells_from_sector, get_villages_from_cell, get_all_children\r\n)\r\n\r\n# Get all provinces\r\nprovinces = get_provinces()\r\nprint(\"Provinces:\", provinces)\r\n\r\n# Get districts in a specific province\r\ndistricts = get_districts_from_province('East')\r\nprint(\"Districts in East Province:\", districts)\r\n\r\n# Get sectors in a specific district - For example: Nyagatare District\r\nsectors = get_sectors_from_district('East', 'Nyagatare')\r\nprint(\"Sectors in Nyagatare District:\", sectors)\r\n\r\n# Get cells in a specific sector - For example: Nyagatare Sector\r\ncells = get_cells_from_sector('East', 'Nyagatare', 'Nyagatare')\r\nprint(\"Cells in Nyagatare Sector:\", cells)\r\n\r\n# Get villages in a specific cell - For example: Barija Cell\r\nvillages = get_villages_from_cell('East', 'Nyagatare', 'Nyagatare', 'Barija')\r\nprint(\"Villages in Barija Cell:\", villages)\r\n\r\n# Get all children based on hierarchy level\r\nchildren = get_all_children(province='East', district='Nyagatare', sector='Nyagatare')\r\nprint(\"Children in Nyagatare Sector:\", children)\r\n```\r\n\r\n\r\n## License\r\nThis project is licensed under the MIT [License]() - see the LICENSE file for details.\r\n\r\n## Contributing\r\nFeel free to open issues and submit pull requests to improve the package. Your contributions are welcome!\r\n\r\n\r\n## Contact\r\nFor any questions or feedback, please contact Fredson Gisa Kaze at [fredson.coder@gmail.com]()\r\n\r\n## Acknowledgements\r\nThank you for using `rwanda_locations`. We hope it helps you efficiently work with Rwandan location data!\r\n\r\n\r\n## Changelog\r\n1.0\r\n* initial release\r\n* province names and other entities up-to villages(Imidugudu)\r\n* lookup() method\r\n* shapefile URLs for various regions\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for working with Rwandan location metadata, including provinces, districts, sectors, cells, and villages.",
"version": "1.1",
"project_urls": {
"Homepage": "https://github.com/gisakaze/rwanda_locations"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "61ab0eb7d108fd4f43fa9f3577a4ffc9effbac61c827d588da05fb03c2c259c9",
"md5": "1b2fbf41b980c588536c52a57efb77e0",
"sha256": "563aae3d3aaf53b57f8f37b095a904954c18bee2a018043294b184d2b2bf7ab2"
},
"downloads": -1,
"filename": "rwanda_locations-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1b2fbf41b980c588536c52a57efb77e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 73847,
"upload_time": "2024-07-24T12:53:15",
"upload_time_iso_8601": "2024-07-24T12:53:15.290457Z",
"url": "https://files.pythonhosted.org/packages/61/ab/0eb7d108fd4f43fa9f3577a4ffc9effbac61c827d588da05fb03c2c259c9/rwanda_locations-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e232a1c6e15981eafaa93a1b324ff93a5a6577c1a5ce1a310025f3bdd349680",
"md5": "acdc6c2270d5087d6faa98fe553818a1",
"sha256": "408922e3354ee15235868909834f8bf90f2f6ccb347d92b5a33fec70daa9574f"
},
"downloads": -1,
"filename": "rwanda_locations-1.1.tar.gz",
"has_sig": false,
"md5_digest": "acdc6c2270d5087d6faa98fe553818a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 73675,
"upload_time": "2024-07-24T12:53:16",
"upload_time_iso_8601": "2024-07-24T12:53:16.548247Z",
"url": "https://files.pythonhosted.org/packages/3e/23/2a1c6e15981eafaa93a1b324ff93a5a6577c1a5ce1a310025f3bdd349680/rwanda_locations-1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-24 12:53:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gisakaze",
"github_project": "rwanda_locations",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "rwanda-locations"
}