I am living close to a "big" kite surfing beach near Softades (Cypriots are scared of kites and they confine us to specific areas by law). There are 2 websites with live weather data for said beach, kitemed that doesn't work at all, and kahuna. The problem with the latter is that it reports instantaneous wind speed, whereas one needs averages to mask out gusts and random variations. I tried in vain to explain to kite shack proprietors the importance of statistics, so I decided to web-scrape and calculate averages myself.
Using a Python library called Beautiful Soup you can break down the HTML tree that is the source of any webpage and read parts of interest. Examining Cahuna's weather page with my browser's Developer tools reveals that the wind data are in this element:
<span class="block text-red p--xl">4.7 knots</span>
The idea is to write a small Python program that reads the (instantaneous) wind speed once a minute, and then average and present the result over 5 minutes. Here is the code (jupyter notebook)
You need something like Anaconda to run this jupyter notebook
The user interface isn't much to look at, it merely prints out wind speeds as it reads them once a minute, and eventually reports the important average speed like this:
17.5 19.4 17.3 19.4 17.1 19.4 16.9 18.5 17.3 19.4 17.9 19.4 1-minute samples: 5 max gust: 19.4 average knots: 17.333 (std deviation: 0.344)
Based on this scientific evidence, for today I'll need my 12 meter kite. See you later!
Post a comment on this topic »