Page 25 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 10 Jun 2015 8:16 pm
by colinpb
My explanation wasn’t as clear as it should have been. Hopefully the following will be clearer.

1. Sunshine hours from 2015 April May June, Fig A shows High values from the summaries in Daily View and Season View.
Fig A.PNG
2. To clarify I had no VP2 solar sensor until September 2012, therefore there are no values for June July and August 2012. Logic in deriving solar w/m2 average is correct, see Fig B.
Fig B.PNG
Logic used in Sunshine Hours and ET incorrect and skewing average because 0.0 has been entered for each of these 3 months; see Fig C. See Fig D for correct values using logic used in solar (Fig B)
Fig C.PNG
Fig D.PNG
Just noticed slight rounding error in Fig C 3.6 v 3.7

Colin

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 10 Jun 2015 10:40 pm
by beteljuice
Please read through the later parts of the thread (although it is rather long) regarding either the need to nullify incorrect data or turn on or off "zero as null" options.

Sorry I'm not very helpful ATM ...... personal mental downtime.

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 19 Aug 2015 10:02 am
by kocher
Cheers

Congratulations for this wonderful work. :D
I love the amount of data it provides and the beautiful design:

http://kocher.es/cumulus_estadistica.php

I wonder if it would be possible to add a small table to present the total monthly average values (from the commissioning of the station).

Edit

I was thinking of rainfall data. I see the daily monthly average, but I'm interested in the total monthly average of all years.

The result would be something like this:

http://kocher.es/central.php

Saludos desde San Sebastian

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 25 Sep 2015 10:03 am
by iandrews
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.

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 25 Sep 2015 11:48 am
by beteljuice
Hmmm ........
Anything 'solar' was always a bit of a 'bodge' - especially because of your circumstances where there is no data before an upgraded kit.

I suspect you may have to accept it as is - but if I can reactivate my jaded brain cells I'll have a think about it ...

Edit: ATM I can't remember if the same thing happens in the same convoluted circumstances for non-solar data.

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 25 Sep 2015 1:08 pm
by iandrews
beteljuice wrote:
Edit: ATM I can't remember if the same thing happens in the same convoluted circumstances for non-solar data.
Over the weekend I will try to "Null" out some other values, such as "Max Temp" for a year or 2, and see what happends.

Ian.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 27 Sep 2015 7:11 pm
by iandrews
So, I deleted (nulled) out a couple of years worth of MaxTemp data (I removed Jan 2010 to April 2012), and I got the same as with the Solar data. With MaxTemp not in the Null array I got lots of 0's in the bottom Avg table (temp.jpg) which skews the Avg's, and with MaxTemp in the Null array I got "nothing" before the data started and the Avg's look ok (temp1.jpg).

Though the Seasonal table with MaxTemp not in the Null array shows 0's for the missing data (temp2.jpg) it does seem to show the same Avg for Spring 2012 for when it is in the Null array (temp3.jpg).

Ian.

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 10 Mar 2016 4:08 pm
by Mapantz
As I mentioned in another thread, I'm a bit late to the party with these scripts- again, thank you for allowing us to use them!

Quick question: Is there a version floating around, that will pull the data from MySQL?

Many thanks.

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 10 Mar 2016 4:37 pm
by mcrossley
Mine uses MySQL, but it diverged from this version a while back, and aged - it doesn't have the new bells and whistles that have been added by beteljuice.

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 30 Jun 2016 9:56 pm
by Mrc
Hi. I just found this dayfile reader and i would like to use it but there's a problem: there's no data.
I think my addres to dayfile is correct because it doesn't say 'error reading dayfile' or something like that anymore. I uploaded all the files and configured cumulus settings but still no data.
Here's a link:
http://www.kesis.info/Saa/betel_datasummary.php

Re: Yet Another Dayfile Reader (PHP)

Posted: Fri 01 Jul 2016 1:04 am
by beteljuice
... it doesn't say 'error reading dayfile' or something like that anymore.
That suggests you had a problem earlier !

It obviously can't "see" your data for whatever reason. Double check your paths from where the file is located.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 02 Jul 2016 2:47 pm
by Mrc
beteljuice wrote:
... it doesn't say 'error reading dayfile' or something like that anymore.
That suggests you had a problem earlier !

It obviously can't "see" your data for whatever reason. Double check your paths from where the file is located.
I've tried several adresses, like $dayfile = 'dayfile.txt'; $dayfile = '/Saa/dayfile.txt'; $dayfile = '../Saa/dayfile.txt'; but still no data :(

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 02 Jul 2016 9:31 pm
by beteljuice
Two problems, looking at your realtime.txt ..
In the prog. you have ...

Code: Select all

 $dayfile = 'dayfile.txt'; // to work correctly this should be a relative address NOT full url

$field_delimiter = ',';
$date_delimiter = '/';
... but your $field_delimiter = ';' and $date_delimiter = '.' ;)

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 03 Jul 2016 7:01 am
by Mrc
beteljuice wrote:Two problems, looking at your realtime.txt ..
In the prog. you have ...

Code: Select all

 $dayfile = 'dayfile.txt'; // to work correctly this should be a relative address NOT full url

$field_delimiter = ',';
$date_delimiter = '/';
... but your $field_delimiter = ';' and $date_delimiter = '.' ;)
Thank you, i was focused only at the adress, now it works!
Thanks!! :)

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 03 Jul 2016 12:51 pm
by JennyLeez
-17.8 in January :shock:
Thats gotta be cold.

Summary looking good :)