Purpose
This webapp is designed to provide an analysis of weather forecast accuracy over differing lead times. It collects weather forecasts and the current weather and plost the accuracy over forecast lead time.
Naturally, the accuracy of weather forecasts fluctuates over time, and likely will never be 100% accurate. This webapp aims to provide insights into how accurate the weather predictions are over differing lead times, and can help to make informed decisions based on the forecast.
Data sources
The data source for this project is OpenWeatherMaps. The current weather and the 5-day 3 Hour forecast are collected every hour, and plotted agaisnt each other. As the 5 day forecast is a 3 hour forecast (at the 0th, 3rd, 6th, 9th hours etc.), accuracy plots compare the actual weather conditions to the nearest forecast (weather at 01:00 is compared to 00:00 forecast, weather at 02:00 is compared to 03:00 forecast, etc).
Glossary
MAE (Mean absolute error)
This is calculated by taking the absolute difference between the predicted and actual values, and then averaging those differences over all the predictions. As this number uses the absolute value, it is always positive.
RMSE (Root mean squared error)
This is calculated by taking the square of the difference between the predicted and actual values, averaging those squares, and then taking the square root of the result. As this number uses the squared value, it is always positive.
Bias (Mean error)
This is calculated by taking the difference between the predicted and actual values, averaging those differences, and then taking the average of the absolute values of those differences. This is not squared or absolute, so it can be negative, helping to show the bias of the weather in either direction.
Technology
The frontend is built using Next.js and Tailwind CSS, and the backend is built using Python and FastAPI. The data is stored in a PostgreSQL database, and the frontend is deployed on Vercel.
About the Author
Created by Scott Fear: Software engineer, Data Analyst, Pianist, Writer.
This web app idea originally came from the dissertation for my Masters degree; I generated a tool that collected weather data hourly, and then analysed the bias of temperature forecasting over time.
At the time my resources were limited; I created an iOS app that queried an API, and I left my iPad on 24/7 for months - collecting current weather and the weekly forecasts that were updated hourly. I then spent a long time in python/excel parsing the results. This web app is a modernized version of that tool using modern technologies and techniques.