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. [API Development](/categories/api)
4. /
5. previousnext/bom-weather

ActiveLibrary[API Development](/categories/api)

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

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

1.0.0-alpha2(3w ago)55043[2 PRs](https://github.com/previousnext/bom-weather/pulls)GPL-2.0-or-laterPHPPHP ^8.1

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 2d ago

READMEChangelogDependencies (24)Versions (6)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

40

—

FairBetter than 88% of packages

Maintenance53

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~2856 days

Total

2

Last Release

23d ago

PHP version history (2 changes)1.0.0-alpha1PHP ^7.2

1.0.0-alpha2PHP ^8.1

### 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

Static AnalysisPHPStan

Type Coverage Yes

### 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.6M651](/packages/sylius-sylius)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)

PHPackages © 2026

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