PHPackages                             previousnext/bom-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. previousnext/bom-weather

ActiveLibrary

previousnext/bom-weather
========================

PHP lib for accessing the Australian Bureau of Meteorology (BOM) weather forecasts and observations.

1.0.0-alpha1(7y ago)55043[2 PRs](https://github.com/previousnext/bom-weather/pulls)GPL-2.0-or-laterPHPPHP ^7.2

Since Jun 25Pushed 2y ago7 watchersCompare

[ Source](https://github.com/previousnext/bom-weather)[ Packagist](https://packagist.org/packages/previousnext/bom-weather)[ RSS](/packages/previousnext-bom-weather/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

BOM Weather
===========

[](#bom-weather)

A PHP library for fetching data from the Australian Bureau of Meteorology API.

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

[](#installation)

```
composer require previousnext/bom-weather php-http/discovery

```

The library requires a PSR-18 HTTP client and PSR-17 HTTP factories. We recommend using [Guzzle](https://docs.guzzlephp.org/en/stable/).

Usage
-----

[](#usage)

### Forecasts

[](#forecasts)

```
$httpClient = new GuzzleHttp\Client(['base_uri' => 'http://www.bom.gov.au/']);
$requestFactory = new Http\Factory\Guzzle\RequestFactory();
$client = new BomClient($httpClient, $requestFactory, new NullLogger());
$forecast = $client->getForecast('IDN10031');

$issueTime = $forecast->getIssueTime();

$regions = $forecast->getRegions();
$metros = $forecast->getMetropolitanAreas();
$locations = $forecast->getLocations();

foreach ($locations as $location) {
  $aac = $location->getAac();
  $desc = $location->getDescription();

  /** @var \BomWeather\Forecast\ForecastPeriod[] $periods */
  $periods = $location->getForecastPeriods();

  // Usually 7 days of forecast data.
  foreach ($periods as $period) {
    $date = $period->getStartTime();
    $maxTemp = $period->getAirTempMaximum();
    $precis = $period->getPrecis();
  }
}
```

### Observations

[](#observations)

```
$httpClient = new GuzzleHttp\Client(['base_uri' => 'http://www.bom.gov.au/']);
$requestFactory = new Http\Factory\Guzzle\RequestFactory();
$client = new BomClient($httpClient, $requestFactory, new NullLogger());
$observationList = $client->getObservationList('IDN60901', '95757');

$refreshMessage = $observationList->getRefreshMessage();

// Get the latest observation.
$observation = $observationList->getLatest();
$rain = $observation->getRainSince9am();

// Station information.
$station = $observation->getStation();
$name = $station->getName();

// Temperature observations.
$temperature = $observation->getTemperature();
$airTemp = $temperature->getAirTemp();
$apparentTemp = $temperature->getApparentTemp();
$relativeHumidity = $temperature->getRealtiveHumidity();

// Wind observations.
$wind = $observation->getWind();
$direction = $wind->getDirection();
$speedKmh = $wind->getSpeedKmh();
$gustKmh = $wind->getGustKmh();

// Pressure observations.
$pressure = $observation->getPressure();
$qnh = $pressure->getQnh();
$meanSeaLevel = $pressure->getMeanSeaLevel();
```

Developing
----------

[](#developing)

**PHP CodeSniffer**

```
./bin/phpcs

```

**PHPUnit**

```
./bin/phpunit

```

**PHPStan**

```
./bin/phpstan

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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

Unknown

Total

1

Last Release

2875d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6132?v=4)[Kim Pepper](/maintainers/kimpepper)[@kimpepper](https://github.com/kimpepper)

---

Top Contributors

[![kimpepper](https://avatars.githubusercontent.com/u/6132?v=4)](https://github.com/kimpepper "kimpepper (32 commits)")[![mohit-rocks](https://avatars.githubusercontent.com/u/2618452?v=4)](https://github.com/mohit-rocks "mohit-rocks (1 commits)")[![settermjd](https://avatars.githubusercontent.com/u/196801?v=4)](https://github.com/settermjd "settermjd (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)

PHPackages © 2026

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