Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1.52 KB

README.md

File metadata and controls

17 lines (10 loc) · 1.52 KB

Weather Forecaster for Oslo

Overview

This application automates weather forecasting for Oslo by downloading weather reports from the MET API in JSON format, mapping the data in a plot, and converting the plot to a PNG image. The core functionality is handled by a GitHub Actions workflow that automates the entire process. This workflow uses a bot to commit the PNG image, effectively overriding the previous one and thus updating the README file with the latest forecast.

Steps

  1. Fetch Forecast: The script first calls our API Integration to download the latest weather forecast in JSON format. The JSON files are stored in the forecast directory.

  2. Generate Visual Report: The JSON data is processed to extract key weather details, such as temperature and wind speed. A plot is generated using this data and saved as a PNG image. This image is committed to the repository in the assets directory by a bot as part of the GitHub Actions workflow.

  3. Update README: Once the PNG is saved, the README is automatically updated to reflect the new forecast image, as it is replacing the previous one. The image is referenced in the README using Markdown, with the path pointing to the asset directory.

Additionally, you can run the application locally to choose and visualize a forecast from a specific past date.

Current forecast

screenshot