PHPackages                             jaymeskat/ug-geog - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jaymeskat/ug-geog

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jaymeskat/ug-geog
=================

Laravel package to access demographic data on Uganda's regions and districts

18PHPCI failing

Since Nov 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/JaymesKat/UgGeog)[ Packagist](https://packagist.org/packages/jaymeskat/ug-geog)[ RSS](/packages/jaymeskat-ug-geog/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![CircleCI](https://camo.githubusercontent.com/811438532bfcc0cbb8248a1418182f219faaddaa2397ab100b1cd159bb17c29b/68747470733a2f2f636972636c6563692e636f6d2f67682f4a61796d65734b61742f556747656f672e7376673f7374796c653d737667)](https://circleci.com/gh/JaymesKat/UgGeog)[![Test Coverage](https://camo.githubusercontent.com/a076f6ef7e19e539a8798da366f6ccd30cebae431b5fcec45c75c4a3e01c2d9d/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36303861643465326362396164643234303434342f746573745f636f766572616765)](https://codeclimate.com/github/JaymesKat/UgGeog/test_coverage)

UgGeog
======

[](#uggeog)

This is a laravel package you can use to retrieve population data for Uganda's regions, districts, subcounties and population according to the [2014 census data](http://catalog.data.ug/dataset/2014-census-data/resource/a7aff54f-a3e1-408c-94b4-cb28dde3c7dd)

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

[](#description)

This package lets you to access population statistics such as male/female population, gender ratio, land area and population density associated with regions, districts or subcounties within Uganda

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

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
    - [Composer](#composer)
    - [Service Provider](#service-provider)
    - [Publish Package](#publish-package)
    - [Run Migrations](#run-migrations)
- [Usage](#usage)
    - [Getting All Records](#getting-records)
    - [Getting Specific Records](#getting-specific-records)
- [Credits](#credits)
- [Contributions](#contributions)
- [License](#license)

---

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

[](#requirements)

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

- PHP 5.3 or later
- Composer

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

[](#installation)

Follow these steps to install and setup the package within your project

### Composer

[](#composer)

Pull this package in through Composer

```
composer require jaymeskat/ug-geog

```

### Service Provider

[](#service-provider)

- Laravel 5.5 + Uses package auto discovery features to recognise the package.
- Laravel 5.4 and below Add the package to your application service providers in `config/app.php` file.

```
'providers' => [

    ...

    /**
     * Package Service Providers...
     */
    JaymesKat\UgGeog\UgGeogServiceProvider::class,

],
```

### Publish Package

[](#publish-package)

Publish the package to your application if required by running this command in your terminal.

```
php artisan vendor:publish --provider="JaymesKat\UgGeog\UgGeogServiceProvider"

```

Ensure all package classes are autoloaded

```
composer dump-autoload

```

### Run Migrations

[](#run-migrations)

Set up seeding by adding the code below in the body of the `run` function inside the `DatabaseSeeder.php` file located within the `database/seeds` folder

```
$this->call(RegionsTableSeeder::class);

```

Run migrations to provision tables in your database, this will also add seed data to tables.

```
php artisan migrate --seed

```

---

Usage
-----

[](#usage)

### Getting All Records

[](#getting-all-records)

Use models from package to get the records.

#### Regions

[](#regions)

```
    use JaymesKat\UgGeog\Models\Region;

    $regionsArray = Region::list();
```

#### Districts

[](#districts)

```
    use JaymesKat\UgGeog\Models\District;

    $districtsArray = District::list();
```

#### Subcounties

[](#subcounties)

```
    use JaymesKat\UgGeog\Models\Subcounty;

    $subcountiesArray = Subcounty::list();
```

### Getting Specific Records

[](#getting-specific-records)

Use the package models to retrieve specific region, district or subcounty information.

```
use JaymesKat\UgGeog\Models\Region;
use JaymesKat\UgGeog\Models\District;
use JaymesKat\UgGeog\Models\Subcounty;

$region = Region::get('Central');

$district = District::get('Kampala');

$subcounty = Subcounty::get('Bihanga');

// Get all districts within a region
$districtsWithinRegion = District::inRegion('Western');

// Get all subcounties within a district
$subcountiesWithinDistrict = Subcounty::inDistrict('Jinja');
```

---

Credits
-------

[](#credits)

The data used in this package was published by [Uganda Bureau Of Statistics](https://www.ubos.org) on [data.ug](http://catalog.data.ug/dataset/2014-census-data/resource/a7aff54f-a3e1-408c-94b4-cb28dde3c7dd)

Contributions
-------------

[](#contributions)

I welcome comments for improvements on this package. Please document this by creating an issue

License
-------

[](#license)

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

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

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

---

Top Contributors

[![JaymesKat](https://avatars.githubusercontent.com/u/4680759?v=4)](https://github.com/JaymesKat "JaymesKat (1 commits)")

### Embed Badge

![Health badge](/badges/jaymeskat-ug-geog/health.svg)

```
[![Health](https://phpackages.com/badges/jaymeskat-ug-geog/health.svg)](https://phpackages.com/packages/jaymeskat-ug-geog)
```

PHPackages © 2026

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