Page 1 of 1

Question for Mark Crossley: Historic Charts - possible new graph for wind direction?

Posted: Thu 11 Feb 2021 9:02 pm
by martinu
Mark: I've been looking at the dashboard interface HTML/JS code and I'm curious about a possible future enhancement...

I notice that the dashboard interface for the Historic Charts (interface/js/chartshistoric.js) has a commented-out doWindDir() routine which reads data from api/dailygraphdata/winddata.json.

Is the API that this code talks to still under development, hence the routine being commented-out? Out of interest, I un-commented it and created a button in chartshistoric.html to call it, but although the axes are drawn, the graph hangs on "Loading". If the API isn't there, that probably explains it :D.

Is the intention that there will be daily dominant wind direction readings, with the same time values (UNIX epoch times for DD/MM/YYYY 00:00:00) as for Max Wind, Max Gust and Wind Run in the doWind() routine?

Is there a reason why you are using a separate json file / API rather than adding it to api/dailygraphdata/wdirdata.json that is read in doWind(). It would be useful to plot Dominant Wind Dir alongside Max Wind, Max Gust and Wind Run on the same time axis, which is a lot easier if all the data is in one json file than trying to merge data from two different files.

I may be barking up completely the wrong tree here. I hope you'll forgive me my curiosity :D.

Re: Question for Mark Crossley: Historic Charts - possible new graph for wind direction?

Posted: Fri 12 Feb 2021 1:07 pm
by mcrossley
Originally I had planned on adding the direction as a separate chart as per the trends, but I decided it wasn't that useful. It may be resurrected at some point though - possibly as part of the other wind graph as you suggest.