Posts

Showing posts with the label forecast

Using weather forecast data

Image
 Using weather forecast data Compare your readings with a forecast Having built a microbit-based weather station , I was keen to see how its readings compared with forecasts (in my case I used Met Office data). I quickly got bored with downloading the forecast manually, so here's a way of doing it with a Google spreadsheet and some GAS (Google Apps Script - which is really JavaScript plus some handy libraries). Here are some example charts: Accessing Met Office forecasts The first thing is to get yourself access to the Met Office forecasts, at Met Office DataPoint . Here you can register and get your own API Key - a kind of password that will be used in the URL you use to fetch the forecast data. Google Apps Script Now you can create your spreadsheet and script. If this is new to you, try this article . I'll describe my own script below. The entire code is written as one function: getTH(). It starts like this: