PHPackages                             bthpan/weather - 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. [Framework](/categories/framework)
4. /
5. bthpan/weather

ActiveLibrary[Framework](/categories/framework)

bthpan/weather
==============

A weather module.

v1.0.9(5y ago)025MITPHPPHP &gt;=7.4

Since Dec 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ejessyp/weather)[ Packagist](https://packagist.org/packages/bthpan/weather)[ RSS](/packages/bthpan-weather/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/0965eb15419b3ed9c603caab102478459a282d21cc186e20d60f41f9c2dd8d43/68747470733a2f2f706f7365722e707567782e6f72672f62746870616e2f776561746865722f76)](//packagist.org/packages/bthpan/weather)[![Build Status](https://camo.githubusercontent.com/256b26433fe2c95a20049b66beef2c9b63ed5c2f04c259eaf941fef59aa27c9a/68747470733a2f2f7472617669732d63692e636f6d2f656a65737379702f776561746865722e7376673f6272616e63683d6d61696e)](https://travis-ci.com/ejessyp/weather)[![CircleCI](https://camo.githubusercontent.com/92834686d50f3bab4c9351a7ec583cd56ad4a0662f12437e63d339afca7e8263/68747470733a2f2f636972636c6563692e636f6d2f67682f63616e61782f72656d7365727665722e7376673f7374796c653d736869656c64)](https://circleci.com/gh/ejessyp/weather)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8003f0bb02a40947f9b30696ed01e591b88dcdef122aa18ecc2efb8c244ce901/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656a65737379702f776561746865722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ejessyp/weather/?branch=main)[![Code Coverage](https://camo.githubusercontent.com/999ecb83792d255c56bc035d5fe8271e432b734baec1d4a74067bd444d8d8e14/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656a65737379702f776561746865722f6261646765732f636f7665726167652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ejessyp/weather/?branch=main)[![Build Status](https://camo.githubusercontent.com/7832a4c5ea7a94f7c4511a611a3a944c89af885905f034bb50957664a44263e3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656a65737379702f776561746865722f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ejessyp/weather/build-status/main)[![Codacy Badge](https://camo.githubusercontent.com/dfe09c4c68e0b2eba4dceb99e845ee7191b4e0922762c058df48be786db0bf67/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3564393266616631373839323433303539646362326461353665396533396262)](https://www.codacy.com/gh/ejessyp/weather/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ejessyp/weather&utm_campaign=Badge_Grade)

Weather module implements a weather service

Install as an Anax module
-------------------------

[](#install-as-an-anax-module)

There are two steps in the installation procedure, 1) first install the module using composer and then 2) integrate it into you Anax base installation.

### Step 1, install using composer

[](#step-1-install-using-composer)

Install the module using composer.

```
composer require bthpan/weather

```

### Step 2, integrate into your Anax base

[](#step-2-integrate-into-your-anax-base)

You can review the module files in the directory `vendor/bthpan/weather/`. It consists of the following parts.

FileDescription`src/Controller/weatherController.php`This is a controller class,"weather" service to show 5 days history and 7 days forecast.`src/Controller/weatherApiController.php`This is a controller class,"weatherApi" return the same data like the above but with json format.`src/IpGeo/IpGeoweather.php`This is a module class, return data from api.ipstack.com with json format.`src/OpenWeather/OpenWeather.php`This is a module class, return data from api.openweathermap.org with json format.`src/OpenWeather/NameToGeo.php`This is a module class, return data from nominatim.openstreetmap.org with json format.`router/450_weather-controller.php`The routes supported for the weather service. The route is implemented by the `weatherController` class.`router/451_weather-api-controller.php`The routes supported for the weather API. The route is implemented by the `weatherApiController` class.`weather/README.md`Short explanation on how to add new datasets.You may copy all the module files with the following command.

```
# Move to dir me/redovisa
rsync -av  vendor/bthpan/weather/config/router/  ./config/router/
# Copy the files for creating the services into $di for ipgeoweather and openweather
rsync -av  vendor/bthpan/weather/test/config/di/ipstack.php  ./config/di/
rsync -av  vendor/bthpan/weather/test/config/di/openweather.php  ./config/di/
# Copy the config files(apikey) for creating the services into $di for ipgeoweather and openweather
rsync -av  vendor/bthpan/weather/test/config/ipstack.php ./config/
rsync -av  vendor/bthpan/weather/test/config/weather.php  ./config/
# Copy the view files
rsync -av  vendor/bthpan/weather/view/ ./view

```

The weather service is now active on the route `weather2/`. The weather API is now active on the route `weather2Api`.

Dependency
----------

[](#dependency)

This is a Anax modulen and its usage is primarly intended to be together with the Anax framework.

You can install an instance on [anax/anax](https://github.com/canax/anax) and run this module inside it, to try it out for test and development.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~1 days

Total

10

Last Release

1983d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54470981?v=4)[Pan Qing](/maintainers/ejessyp)[@ejessyp](https://github.com/ejessyp)

---

Top Contributors

[![ejessyp](https://avatars.githubusercontent.com/u/54470981?v=4)](https://github.com/ejessyp "ejessyp (31 commits)")

---

Tags

frameworkmvcweatherlearning

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bthpan-weather/health.svg)

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

PHPackages © 2026

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