First off, thanks to beteljuice (and others) who have worked on this.
I was using an older PHP version found here,
http://wiki.sandaysoft.com/a/AnnualDataSummary and can’t 100% remember, but may have made some changes to add the colour scale when it was set up several years ago. I only ever got a basic page set up, and it can be seen here:
http://weather.wanders.me.uk/weather/hi ... ummary.php
I was upgrading to a new server to host my PHP pages, and was looking around to see if there was updated code, and that is how I found this thread. I download the files, and with 10 mins or so had the web page up.
I updated my weather station in April this year to a Davis Pro with solar & UV sensor, so have no data for those readings before then. In inr PHP code I had the default setting for Nullify 0 data set to true, and the default entry’s in the array (so included sunhours / solar / UV). When I clicked on any of the 3 buttons for these all looked ok with the cells before April this year (and for all previous years) being blank. Also the Avg table at the bottom of the page looked ok and just showed a row for 2015, with Jan / Feb / March being blank, and data in the rest of the months that have passed being correct.
Now, the only issue with that is that I have had some (true) 0 sunhours hours in the last few months, and those were being blanked out of the main table, and as such skewing the monthly day average.
Now I have spent an hour (or more) reading the whole thread, and found (and understood) about nullifying the 0’s for the relevant solar data in the dayfile.txt and removing the sunhours / solar / UV entries from the “Nullify” array.
So I spent an hour last night removing the 0’s from (a copy) of the dayfile.txt, I then uploaded it to my server, and removed the sunhours / solar / UV entries from the “Nullify” array. The Sunshine page then looked like the attached.
Cells for before April were blank, and true 0’s were still displayed in the data, and taken into account when working out the monthly day average. HOWEVER the Ave table below was now incorrect. It was now showing a line for all years I have data for (from 2010), and (apart from the few months for this year where I do have data) all were showing 0’s. This then totally skews the Avg line at the bottom.
Now, not sure if I have done something wrong, need to do something else, or this is just the way it is, but it seems that the code for the Avg table isn’t taking into account the null values. So it seems that as it stands (even with my data “Nullifed” I either have sunhours / solar / UV entries in the “Nullify” array and the Avg table at the bottom is correct, but “true” 0 data is removed from the main table, or I have them removed from the “Nullify” array and the main table is correct, but the bottom Avg table isn’t.
For info, my page can be seen here:
http://weather.wanders.me.uk/weather/historic/basic.php as it stands the 0’s aren’t nullified out (as the file got automatically overwritten last night with a non nulled version) and sunhours / solar / UV entries are not in the “Nullify” array, that’s why data from before April is showing 0’s.
Ian.