PHPackages                             tellyarz/afri-weather-app - 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. tellyarz/afri-weather-app

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

tellyarz/afri-weather-app
=========================

Fetch current and weather forecast from OpenWeatherMap

08PHP

Since Apr 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/tellyarz/AfriWeatherApp)[ Packagist](https://packagist.org/packages/tellyarz/afri-weather-app)[ RSS](/packages/tellyarz-afri-weather-app/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

AfriWeatherApp
==============

[](#afriweatherapp)

Fetch current and weather forecast from OpenWeatherMap

### How to Install:

[](#how-to-install)

Install using composer:

```
composer require tellyarz/afri-weather-app
```

### How to use:

[](#how-to-use)

```
include 'vendor/autoload.php';

//create open weather object and retrieve weather forecast for 5days
$op = new \AfriWeatherApp\OpenWeather('your_api_key');
$weather = $op->getWeatherForecast('Abuja');

//decode json string
$decodedString = json_decode($weather, true);
if(intVal($decodedString['cod']) === 200)
{
    //we have weather data ready, get the list
    $listData = $decodedString['list'];
    //iterate through list
    foreach($listData as $list) {
        $timeStamp = $list['dt'];
        $timeString = $list['dt_txt'];

        $mainSubArray = $list['main'];
        $tempMin = $mainSubArray['temp_min'];
        $tempMax = $mainSubArray['temp_max'];
        $pressure = $mainSubArray['pressure'];
        $seaLevel = $mainSubArray['sea_level'];
        $groundLevel = $mainSubArray['grnd_level'];
        $humidity = $mainSubArray['humidity'];

        $weatherSubArray = $list['weather'][0];
        $description = $weatherSubArray['main'];
        $condition = $weatherSubArray['description'];
        $icon = "http://openweathermap.org/img/w/{$weatherSubArray['icon']}.png";

        $windSubArray = $list['wind'];
        $speed = $windSubArray['speed'];
        $degree = $windSubArray['deg'];

        //further process here...
    }
}

//to get current weather data
$currentWeather = $op->getCurrentWeather('London');
//decode json string
$decodedString_ = json_decode($currentWeather, true);
if(intVal($decodedString_['cod']) === 200)
{
    //successfully fetched weather data
    var_dump($decodedString_);
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/d0cb5e3a7c84fa5086cba47d3d63da4210d5aacf7dae3af65a33a92d92073bd8?d=identicon)[tellyarz](/maintainers/tellyarz)

---

Top Contributors

[![kingsleyokpokor](https://avatars.githubusercontent.com/u/107812371?v=4)](https://github.com/kingsleyokpokor "kingsleyokpokor (9 commits)")

### Embed Badge

![Health badge](/badges/tellyarz-afri-weather-app/health.svg)

```
[![Health](https://phpackages.com/badges/tellyarz-afri-weather-app/health.svg)](https://phpackages.com/packages/tellyarz-afri-weather-app)
```

PHPackages © 2026

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