Skip to content

Manage City Forecasts

Grace Amondi edited this page Apr 24, 2023 · 8 revisions

Preview Home

City forecasts displayed on the homepage, and forecasts page can be added through the CMS in two ways:

  1. Manually adding daily forecasts
  2. Fetching city forecasts from an external source i.e YR Meteo Norway's location forecast API https://developer.yr.no/featured-products/forecast/

Manually Adding Forecasts

The city forecast explorer menu can be accessed on the left sidebar.

Forecast explorer

Here you have the ability to:

  • Add/Edit/Delete a city (city name and location)

Add city

Add condition

  • Add/Edit a forecast. Optionally, you can download the table as CSV, edit it offline and paste the values to the online table and submit. Ensure to fix all validation error raised before submitting.

Add forecast

  • Query historical forecasts. By selecting query forecasts on the top left dropdown, it is possible to retrieve past forecasts and download by city and date range. This could also provides a quick shortcut for creating a future forecasts.

Query forecast

Creating a forecast for an already existing date will overwrite the values in the database hence can be used a technique of updating existing records.

Fetching from an external source

To enable automated fetching of city forecasts from an external source i.e YR Meteo Norway's location forecast API https://developer.yr.no/featured-products/forecast/, this option needs to be set to true.

The forecast will be fetched every three hours and get updated accordingly.

Clone this wiki locally