PHPackages                             epixian/laravel-noaa - 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. epixian/laravel-noaa

ActiveLibrary

epixian/laravel-noaa
====================

A wrapper for the NOAA's climate data API at https://ncdc.noaa.giv/cdo-web/api/v2

0.3.1(6y ago)18MITPHPPHP &gt;=5.4.0CI failing

Since Oct 10Pushed 6y ago2 watchersCompare

[ Source](https://github.com/epixian/laravel-noaa)[ Packagist](https://packagist.org/packages/epixian/laravel-noaa)[ RSS](/packages/epixian-laravel-noaa/feed)WikiDiscussions master Synced 2mo ago

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

Laravel NOAA
============

[](#laravel-noaa)

Laravel NOAA is a wrapper for the NOAA's climate data API at .

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

[](#installation)

From your source directory, use the following command:

```
$ composer require epixian/laravel-noaa
```

Publish assets:

```
$ php artisan vendor:publish --tag=epixian-laravel-noaa
```

Configuration
-------------

[](#configuration)

Add the following to your `.env` file:

```
NOAA_TOKEN=YOUR_NOAA_TOKEN_HERE
```

Register for a token at .

Usage
-----

[](#usage)

For a full listing of API request parameters, visit: .

#### Required

[](#required)

##### `{requestType}()`

[](#requesttype)

where `{requestType}` is one of:

- [`datasets`](#datasets)
- [`dataCategories`](#data-categories)
- [`dataTypes`](#data-types)
- `locationCategories`
- `locations`
- `stations`
- `data`

Sets the type of request to be generated.

##### `get()`

[](#get)

Executes the request and returns a JSON-decoded result (typically an array) depending on the API response. Note: requires a request type method to be previously called and must be the last call when chaining methods.

```
// fetch all datasets
$response = \Noaa::datasets()->get();
```

Alternatively, you may supply a single `string` argument to `get()` representing an `id` belonging to that request type (valid for all request type methods except `data()`:

```
// fetch dataset with id of 'GSOM'
$dataset = \Noaa::datasets()->get('GSOM');
```

#### Optional

[](#optional)

##### `from(startDate)`

[](#fromstartdate)

`startDate` is a string containing a valid ISO formatted date (e.g. `'2010-10-02'`). Note: this field is **required** for the `data()` request type.

##### `to(endDate)`

[](#toenddate)

`endDate` is a string containing a valid ISO formatted date (e.g. `'2010-10-07'`). Note: this field is **required** for the `data()` request type.

##### `orderBy(field, direction)`

[](#orderbyfield-direction)

`field` is a string containing one of: `id`, `name`, `mindate`, `maxdate`, or `datacoverage`.

`direction` is an optional string containing either `asc` (default if omitted) or `desc`.

##### `limit(number)`

[](#limitnumber)

Defaults to 25 if omitted.

##### `offset(number)`

[](#offsetnumber)

Defaults to 0 if omitted. Note: the API returns results with indexes starting at 1. `offset(0)` and `offset(1)` produce equivalent results.

#### Laravel-style helpers

[](#laravel-style-helpers)

A number of method aliases are provided for convenience:

- `latest()` - equivalent to `orderBy('maxdate', 'desc')`
- `oldest()` - equivalent to `orderBy('mindate', 'asc')`
- `skip(number)` - alias of `offset()`
- `take(number)` - alias of `limit()`
- `where(field, value)` - sets a generic parameter (see )

Request constraints may be chained together to refine or limit the data returned:

```
$dataset = \Noaa::datasets()->from('1970-10-03')->to('2012-09-10')->take(50)->get();
```

Additional constraint methods specific to the request type are detailed below.

### Datasets

[](#datasets)

Returns the available dataset(s) applicable to the given constraints (if any). The following optional constraint methods are available:

##### `withDataType(id)`

[](#withdatatypeid)

`id` is a string containing a single valid data type ID, or an array of strings representing multiple data type IDs.

```
$dataset = \Noaa::datasets()->withDataType('ACMH')->get();
// or
$dataset = \Noaa::datasets()->withDataType(['ACMH', 'MLY-TAVG-NORMAL'])->get();
```

##### `withLocation(id)`

[](#withlocationid)

`id` is a string containing a single valid location ID, or an array of strings representing multiple location IDs.

```
$dataset = \Noaa::datasets()->withLocation('FIPS:37')->get();
// or
$dataset = \Noaa::datasets()->withLocation(['FIPS:09', 'FIPS:10'])->get();
```

##### `withStation(id)`

[](#withstationid)

`id` is a string containing a single valid station ID, or an array of strings representing multiple station IDs.

```
$dataset = \Noaa::datasets()->withStation('COOP:310090')->get();
// or
$dataset = \Noaa::datasets()->withStation(['COOP:310090', 'COOP:310184'])->get();
```

### Data Categories

[](#data-categories)

Returns the available data category(s) applicable to the given constraints (if any). The following optional constraint methods are available:

##### `withDataset(id)`

[](#withdatasetid)

`id` is a string containing a single valid dataset ID, or an array of strings representing multiple dataset IDs.

```
$dataset = \Noaa::dataCategories()->withDataset('ACMH')->get();
// or
$dataset = \Noaa::dataCategories()->withDataset(['ACMH', 'GSOM'])->get();
```

##### `withLocation(id)`

[](#withlocationid-1)

`id` is a string containing a single valid location ID, or an array of strings representing multiple location IDs.

```
$dataset = \Noaa::dataCategories()->withLocation('FIPS:37')->get();
// or
$dataset = \Noaa::dataCategories()->withLocation(['FIPS:09', 'FIPS:10'])->get();
```

##### `withStation(id)`

[](#withstationid-1)

`id` is a string containing a single valid station ID, or an array of strings representing multiple station IDs.

```
$dataset = \Noaa::dataCategories()->withStation('COOP:310090')->get();
// or
$dataset = \Noaa::dataCategories()->withStation(['COOP:310090', 'COOP:310184'])->get();
```

### Data Types

[](#data-types)

Returns the available data type(s) applicable to the given constraints (if any). The following optional constraint methods are available:

##### `withDataset(id)`

[](#withdatasetid-1)

`id` is a string containing a single valid dataset ID, or an array of strings representing multiple dataset IDs.

```
$dataset = \Noaa::dataTypes()->withDataset('ACMH')->get();
// or
$dataset = \Noaa::dataTypes()->withDataset(['ACMH', 'GSOM'])->get();
```

##### `withLocation(id)`

[](#withlocationid-2)

`id` is a string containing a single valid location ID, or an array of strings representing multiple location IDs.

```
$dataset = \Noaa::dataTypes()->withLocation('FIPS:37')->get();
// or
$dataset = \Noaa::dataTypes()->withLocation(['FIPS:09', 'FIPS:10'])->get();
```

##### `withStation(id)`

[](#withstationid-2)

`id` is a string containing a single valid station ID, or an array of strings representing multiple station IDs.

```
$dataset = \Noaa::dataTypes()->withStation('COOP:310090')->get();
// or
$dataset = \Noaa::dataTypes()->withStation(['COOP:310090', 'COOP:310184'])->get();
```

##### `withDataCategory(id)`

[](#withdatacategoryid)

`id` is a string containing a single valid data category ID, or an array of strings representing multiple data category IDs.

```
$dataset = \Noaa::dataTypes()->withDataCategory('ANNAGR')->get();
// or
$dataset = \Noaa::dataTypes()->withDataCategory(['ANNAGR', 'ANNTEMP'])->get();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

2407d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/epixian-laravel-noaa/health.svg)

```
[![Health](https://phpackages.com/badges/epixian-laravel-noaa/health.svg)](https://phpackages.com/packages/epixian-laravel-noaa)
```

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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