PHPackages                             vannut/statamic-weather-addon - 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. vannut/statamic-weather-addon

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

vannut/statamic-weather-addon
=============================

Get weather for a location

v2.0.2(1y ago)53.2k↓54.5%[2 issues](https://github.com/vannut/statamic-weather-addon/issues)PHP

Since May 3Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/vannut/statamic-weather-addon)[ Packagist](https://packagist.org/packages/vannut/statamic-weather-addon)[ RSS](/packages/vannut-statamic-weather-addon/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (8)DependenciesVersions (13)Used By (0)

Weather Forecast
================

[](#weather-forecast)

Display the current weather or a 7-day forecast for any lat/lon on earth.

> Attention: This version (2) is a complete rewrite of the addon. Although it does the same: display a weather forecast; the used weatherprovider is different and some of the fields are renamed. So please pay attention when upgrading.

Visual Crossing
---------------

[](#visual-crossing)

The weather data itself is coming from the Visual Crossing api. [It's free for the first 1,000 records a day.](https://www.visualcrossing.com/weather-data-editions)

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

[](#installation)

1. Install add on through composer: `composer require vannut/statamic-weather-addon "^2.0"`
2. [Create an account](https://www.visualcrossing.com/sign-up) at Visual Crossing.
3. After signing in go to your account, you'll find a `Key`
4. Go to your Statamic Control Panel and look for the Weather entry in the sidebar.
5. Fill out the settings-form with your api-key and create a location to fetch the forecast for.
6. Hit the fetch forecast button.
7. Or Go to the Command line and perform the first initial fetch of your specific data: `php artisan weather:fetchForecast`

Renewing the forecast
---------------------

[](#renewing-the-forecast)

Nothing is as changeable as the weather. Therefore this addon adds [a hourly call](https://github.com/vannut/statamic-weather-addon/blob/master/src/ServiceProvider.php#L25) to the scheduler of Statamic/Laravel. All you have to do is make sure the scheduler is run, by means of a cron-job. Take a look at [Laravels documentation](https://laravel.com/docs/10.x/scheduling#running-the-scheduler) on this!

Usage
-----

[](#usage)

This addon does not provide any styling, it *just* caches the json response and passes the raw data through to the two tags.

You can find every field in the api-response on [the api-docs of Visual Crossing](https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/).

Next to the data provided by the API, the addon adds a couple of nice additional fields:

```
{{ icon_fa }}           A fontawesome icon derived fron weather.0.icon
{{ wind_compass }}   Converted wind direction to N/S/SSW etc
{{ wind_bft }}       Wind speed in Beaufort
{{ uvi_color }}      Color representation of  the UV Index
{{ uvi_percentage }} Percentage where UVI 10 = 100%;
{{ fetched_at }}     Unix Epoch timestamp of the datetime when fetched from API

```

You'll have two tags to your disposal: `{{ forecast }}` and `{{ current_weather }}`

Simple 7 day forecast
---------------------

[](#simple-7-day-forecast)

With the `{{ forecast }}` tag you will be able to display a card per day with the forecast. It's a loop of different days in the forecast. Typically 7 or 15 days depending on the location.

Make sure you specify from which location you want the forecast:

```

    {{ forecast :locale="site" location-identifier="xyz123" }}

                {{ datetimeEpoch | iso_format("dddd") }}
                {{ datetimeEpoch | iso_format("D MMM Y") }}

                    {{ tempmax | round }}&deg;C

                    &nbsp;&nbsp; /
                    {{ tempmin | round }}&deg;C

                    {{ wind_compass }} {{ wind_bft  }}Bft

    {{/forecast }}

```

Current weather
---------------

[](#current-weather)

Want to display the current weather of your location? Use the `{{ current_weather }}` tag. As this is a json-collection you can get its data as following:

```
    {{ current_weather :locale="site" location-identifier="xyz123" }}

                Current temperature: {{  temp }}&deg;C

                Feels like: {{ feels_like }}&deg;C

    {{ /current_weather }}
```

---

[![Compatible with Statamic v5](https://camo.githubusercontent.com/820b9babc7e6fe23a1586cfd06bc39fcccda3204a9619ec59807aa360c5ac1b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e302b2d4646323639453f7374796c653d666f722d7468652d6261646765)](https://statamic.com)[![Addon on Packagist](https://camo.githubusercontent.com/323477896c98c01b3a41812dfa3a38b73f219937b73715def2c3cd22938e38cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616e6e75742f73746174616d69632d776561746865722d6164646f6e3f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/vannut/statamic-weather-addon/stats)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance56

Moderate activity, may be stable

Popularity26

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 ~184 days

Recently: every ~125 days

Total

11

Last Release

89d ago

Major Versions

v0.5 → v1.0.02021-12-11

v1.0.1 → v2.0-beta.12024-10-01

v2.x-dev → v3.x-dev2026-05-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7419859?v=4)[Richard Verbruggen](/maintainers/vannut)[@vannut](https://github.com/vannut)

---

Top Contributors

[![vannut](https://avatars.githubusercontent.com/u/7419859?v=4)](https://github.com/vannut "vannut (35 commits)")

---

Tags

openweathermapopenweathermap-apistatamicstatamic-addonstatamic-v3

### Embed Badge

![Health badge](/badges/vannut-statamic-weather-addon/health.svg)

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

###  Alternatives

[ip2location/ip2location-laravel

Lookup for visitor's IP information, such as country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type.

83562.9k1](/packages/ip2location-ip2location-laravel)[kartik-v/yii2-social

Module containing useful widgets for Yii Framework 2.0 that integrates social functionalities from DISQUS, Facebook, Google etc.

91265.7k8](/packages/kartik-v-yii2-social)[typo3/cms-introduction

The Official TYPO3 Introduction Package

1883.5k6](/packages/typo3-cms-introduction)[alt-design/alt-sitemap

Alt Sitemap addon, create a sitemap from Statamic entries

1224.7k](/packages/alt-design-alt-sitemap)

PHPackages © 2026

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