The Event Weather block

The Event Weather block shows what the weather is doing at the event’s venue on the day of the event. Depending on how far away that day is, you get a forecast, the weather that was actually recorded, or the weather that is typical for that time of year.

Two things must be in place first

  1. Weather has to be switched on. Go to HappenBoard → Integrations, open Weather and turn on Enable weather. While it is off the block renders nothing and no request is ever sent. Enabling weather covers that screen in detail.
  2. The venue needs coordinates. The block finds the venue attached to the event and reads its latitude and longitude. A venue with an address but no coordinates is not enough. Venues: creating and geocoding shows how to fill them in.

With either piece missing, the block quietly outputs nothing rather than showing an error to your visitors. The same happens if the weather service cannot be reached.

Three kinds of weather, picked automatically

You do not choose between them. HappenBoard compares the event date with today and picks:

  • A forecast, for an event today or within the next 16 days. This is the normal case for a published event. If the event is today, the block also has the live temperature and can show current humidity.
  • The observed weather, for an event that has already happened. The reading is prefixed with On the day: so nobody mistakes an archive record for a prediction.
  • A typical day, for an event more than 16 days out. No forecast exists that far ahead, so HappenBoard averages the last ten complete years for that calendar day, taking a window of three days either side to smooth out freak weather. It is prefixed with Typically:

The last case is the reason the block is useful on an event announced months in advance. Be aware that a typical day only carries a condition and a high and low temperature. Rain chance, wind, and sunrise and sunset are not available for it, and those rows simply do not appear.

Choosing a layout

The Display panel has a Layout menu with three choices:

  • Badge: the weather icon and the temperature, nothing else.
  • Compact: the same, plus the condition in words.
  • Detailed: the default, adding a table of extra readings underneath.

The same panel has a Show condition text toggle for the wording next to the temperature, such as Partly cloudy or Light rain.

Units

The Units panel sets how the numbers are written. These are per block, not site-wide, so a page aimed at an international audience can differ from your main event template.

  • Temperature: degrees Celsius or degrees Fahrenheit.
  • Wind speed: km/h, mph, m/s or knots.
  • Precipitation: millimeters or inches.

Extra readings in the detailed layout

With Detailed selected, a Fields panel appears. The high and low temperatures are always shown when they are available; the rest are optional:

  • Precipitation chance, on by default. Shown as a percentage. Forecasts only.
  • Wind, on by default. The strongest wind expected that day.
  • Humidity, off by default. Only available for an event happening today.
  • Sunrise & sunset, off by default. Written in your site’s time format.

A reading that is not available for the day in question is left out rather than shown empty.

Using the block away from an event

The Manual location panel lets the block work on an ordinary page. Fill in Latitude and Longitude to pin it to a fixed place, and optionally Date override with a date written as YYYY-MM-DD. Leave all three blank and the block uses the event’s venue and start date, which is what you want inside an event template. Building a single event page shows where this block normally sits among the other event blocks.

The credit line

Weather comes from Open-Meteo, published under a licence that requires attribution. This has a practical consequence you need to act on.

The Detailed layout prints the credit under the readings. The Badge and Compact layouts do not. So if you use one of the two short layouts, or if you turn the credit off in the settings, you must place the attribution somewhere else on your site, typically the footer or a credits page.

In HappenBoard → Integrations → Weather you can switch the credit off and edit the Credit text. The word Open-Meteo in that text is turned into a link automatically, and if your custom wording leaves the name out, the link is appended so the attribution stays valid.

Why the reading does not change every time you reload

Forecasts are cached and reused for a duration you set in the weather settings, never less than thirty minutes. Past weather and typical weather never change, so they are kept much longer. This keeps your pages fast and keeps the number of outside requests low, which is exactly what you want on an archive page listing dozens of events.

What’s next