PHPackages                             kusaasira/uganda-geo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kusaasira/uganda-geo

ActiveLibrary

kusaasira/uganda-geo
====================

Find districts, counties, sub counties, parishes and villages in Uganda

1.0.0(3y ago)11127↓100%8[3 issues](https://github.com/kusaasira/uganda-geo-data/issues)[1 PRs](https://github.com/kusaasira/uganda-geo-data/pulls)proprietaryPHPPHP &gt;=7.1.3

Since Apr 24Pushed 2y ago3 watchersCompare

[ Source](https://github.com/kusaasira/uganda-geo-data)[ Packagist](https://packagist.org/packages/kusaasira/uganda-geo)[ RSS](/packages/kusaasira-uganda-geo/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

Uganda Geo Data
===============

[](#uganda-geo-data)

This is a PHP package that retrieves Uganda's districts with their respective counties, sub counties, parishes and villages in Uganda. This data has been scrapped off [Uganda's passport's official portal](https://passports.go.ug).

Description
===========

[](#description)

This package gives you the leverage to access all sub levels ranging from districts, counties, subcounties, parishes to villages in Uganda. You can also access the different mentioned areas independently.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Retrieve Districts data](#retrieve-districts-data)
    - [Retrieve Individual geo units data.](#retrieve-individual-geo-units-data)
- [Credits](#credits)
- [Contributions](#contributions)
- [License](#license)

Requirements
------------

[](#requirements)

In order to run this project, ensure that you have installed;

- PHP 7.4 or later
- Composer

Installation
------------

[](#installation)

This project using composer.

```
$ composer require kusaasira/uganda-geo

```

Usage
-----

[](#usage)

The examples below show examples of usage of the package and their resulting outputs

### Retrieve Districts data.

[](#retrieve-districts-data)

```
use Uganda\Uganda;

$uganda = new Uganda();

# Retrieve all districts
$districts = $uganda->districts();

# Retrieve all counties in a particular district
$counties = $uganda
    ->district('Mukono')
    ->counties();

# Retrieve all sub counties in a particular district
$subCounties = $uganda
    ->district('Mukono')
    ->subCounties();

# Retrieve all parishes in a particular district
$parishes = $uganda
    ->district('Mukono')
    ->parishes();

# Retrieve all villages in a particular district
$villages = $uganda
    ->district('Mukono')
    ->villages();
```

### Retrieve County data.

[](#retrieve-county-data)

```
use Uganda\Uganda;

$uganda = new Uganda();

# Retrieve all counties
$counties = $uganda->counties();

# Retrieve specific county
$county = $uganda->county('Adjumani West County');

# Retrieve all sub counties in a particular county
$subCounties = $uganda
    ->county('Adjumani West County')
    ->subCounties();

# Retrieve all parishes in a particular county
$parishes = $uganda
    ->county('Adjumani West County')
    ->parishes();

# Retrieve all villages in a particular county
$villages = $uganda
    ->county('Adjumani West County')
    ->villages();
```

### Retrieve Sub County data.

[](#retrieve-sub-county-data)

```
use Uganda\Uganda;

$uganda = new Uganda();

# Retrieve all sub counties
$subCounties = $uganda->subCounties();

# Retrieve specific sub county
$subCounty = $uganda->subCounty('Namasale Town Council');

# Retrieve all parishes in a particular sub county
$parishes = $uganda
    ->county('Namasale Town Council')
    ->parishes();

# Retrieve all villages in a particular sub county
$villages = $uganda
    ->county('Namasale Town Council')
    ->villages();
```

### Retrieve Parish data.

[](#retrieve-parish-data)

```
use Uganda\Uganda;

$uganda = new Uganda();

# Retrieve all parishes
$parishes = $uganda->parishes();

# Retrieve specific parish
$parish = $uganda->parish('Bunamwamba');

# Retrieve all villages in a particular parish
$villages = $uganda
    ->county('Bunamwamba')
    ->villages();
```

### Retrieve Village data.

[](#retrieve-village-data)

```
use Uganda\Uganda;

$uganda = new Uganda();

# Retrieve all villages
$villages = $uganda->villages();

# Retrieve specific village
$subCounty = $uganda->village('Ayeye');
```

Credits
-------

[](#credits)

The data used in this package has been scrapped off This data has been scrapped off [Uganda's passport's official portal](https://passports.go.ug) as there is no updated geo data source since 2018 published anywhere.

Collaborators ✨
---------------

[](#collaborators-)

  [ ![timek](https://avatars.githubusercontent.com/u/2828143?v=4)
 **Tim3k** ](https://github.com/timek)   [ ![kusaasira](https://avatars.githubusercontent.com/u/10392992?v=4)
 **Joshua Kusaasira** ](https://github.com/kusaasira)   [ ![Marshud](https://avatars.githubusercontent.com/u/63245157?v=4)
 **Marshud** ](https://github.com/Marshud) Contributors ✨
--------------

[](#contributors-)

  [ ![kusaasira](https://avatars.githubusercontent.com/u/10392992?v=4)
 **Joshua Kusaasira** ](https://github.com/kusaasira)   [ ![RoadSigns](https://avatars.githubusercontent.com/u/5822139?v=4)
 **Zack** ](https://github.com/RoadSigns) License
-------

[](#license)

This package is free software distributed under the terms of the MIT license.

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1428d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac715eddfe6ec8acad19af4c86adf55e286289b2d8eb39d9a45dca4f5dd84e55?d=identicon)[kusaasira](/maintainers/kusaasira)

---

Top Contributors

[![kusaasira](https://avatars.githubusercontent.com/u/10392992?v=4)](https://github.com/kusaasira "kusaasira (10 commits)")[![RoadSigns](https://avatars.githubusercontent.com/u/5822139?v=4)](https://github.com/RoadSigns "RoadSigns (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

districts-in-ugandadistricts-ugandahacktoberfesthacktoberfest2022uganda

### Embed Badge

![Health badge](/badges/kusaasira-uganda-geo/health.svg)

```
[![Health](https://phpackages.com/badges/kusaasira-uganda-geo/health.svg)](https://phpackages.com/packages/kusaasira-uganda-geo)
```

###  Alternatives

[codeception/lib-asserts

Assertion methods used by Codeception core and Asserts module

10456.8M14](/packages/codeception-lib-asserts)[lastzero/test-tools

Increases testing productivity by adding a service container and self-initializing fakes to PHPUnit

2244.0k13](/packages/lastzero-test-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
