Page 4 of 5

Re: AnnualDataSummary PHP

Posted: Tue 20 Nov 2012 5:54 pm
by KevinF
Kiwi? That's good shoe polish! :lol:

Re: AnnualDataSummary PHP

Posted: Tue 20 Nov 2012 10:07 pm
by BCJKiwi
KevinF wrote:Kiwi? That's good shoe polish! :lol:
Just like most things from New Zealand!

Re: AnnualDataSummary PHP

Posted: Tue 20 Nov 2012 10:30 pm
by gemini06720
BCJKiwi wrote:Ray, you know who I am as we have exchanged emails. Those are my real initials plus an indication of where in the world I am. I trust you know what a Kiwi is and where it comes from...
Indeed, Mr. B - I found the exchanges we had ... association now completes... ;)

The only thing I know about kiwis is that I have stopped eating them (for the same reason mentioned below)... :mrgreen:
BCJKiwi wrote:Just like most things from New Zealand!
I used to enjoy the New Zealand lamb but now find it tasteless ... that is why I pay a bit more money and get my lamb from an island producer (ie: Vancouver Island, British Columbia, Canada)... :D

Re: AnnualDataSummary PHP

Posted: Wed 21 Nov 2012 4:17 am
by beteljuice
Maintaining legibility especially in the vertical (column) plane for a 'twinned' data entry has proved interesting.

Although I think temperatures in F would be tight, and comparing say high / low pressure would break the cell formating.

The beteljuice attempt using BCJkiwi 'buttons' and Ron's (nitrix) data.
Edit: Out of date link removed

Re: AnnualDataSummary PHP

Posted: Wed 21 Nov 2012 3:31 pm
by mcrossley
Hmm, personally I find these double entries too hard to read, I don't think the slash makes it any easier, a space/double space may be better.

Re: AnnualDataSummary PHP

Posted: Wed 21 Nov 2012 6:38 pm
by beteljuice
Nice idea, but somehow it feels 'uncomfortable' .. Edit: old link removed

... and again with eg. deg, F would become even more confusing - I think any kind of 'double-entry' would have to be judiciously considered upon it's unique output.

Re: AnnualDataSummary PHP

Posted: Thu 22 Nov 2012 1:53 am
by BCJKiwi
Well perhaps you can see why I decided to concatenate the double columns into one.

12.3/23.4
12.3/23.4
12.3/23.4
12.3/23.4

12.3 / 23.4
12.3 / 23.4
12.3 / 23.4
12.3 / 23.4

12.3 23.4
12.3 23.4
12.3 23.4
12.3 23.4

| 12.3 | 23.4 |
| 12.3 | 23.4 |
| 12.3 | 23.4 |
| 12.3 | 23.4 | - if you have a table with borders.

Layout does not really work here as the BBS strips out extra spaces but I guess you get the idea.

"you pays your money and you takes your choice"

Re: AnnualDataSummary PHP

Posted: Thu 22 Nov 2012 2:51 am
by gemini06720
Indeed Mark, the double entries are very difficult to read for most people - I had some double entries months ago when I first installed the original script - then I got some comments from my users/visitors as the double entries, because the font size had to be reduced (to fit within the same space) were quite difficult to read (many of my users are 50+) - thus, I re-wrote the original script, added all the tags available from Cumulus, and deactivated all double entries. I have not received any comments from my 'audience'... ;)

Re: AnnualDataSummary PHP

Posted: Thu 22 Nov 2012 11:40 pm
by BCJKiwi
Back to the new year rollover - Oh dear not yet quite right.
We do need to -1 day.
Have looked in detail at what is on the hoster.
It is the 23/11/2012 here in NZ
The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
Cumulus (well, Windows 7) shows the exact same time stamp.
The data is for the 22nd.

The best solution I could come up with that should work regardless of the rollover time is :-

Code: Select all

// was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
	if (isset($_GET['year'])) {
		$tableYear=$_GET['year'];
	} else {
		if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
			$tableYear = date("Y", filemtime($dayfile)) -1 ;
			} else {
			$tableYear = date("Y", filemtime($dayfile)) ;
			}
		}
i.e. if the mod date of the file is the first day of the year use the previous year.

Re: AnnualDataSummary PHP

Posted: Fri 23 Nov 2012 5:16 pm
by mcrossley
I have tried adding some column banding to my page, I think this helps particularly with the 'double column format?
http://weather.wilmslowastro.com/datasummary.php

Re: AnnualDataSummary PHP

Posted: Sat 24 Nov 2012 1:03 am
by BCJKiwi
Agreed, a significant improvement.

The issue for me with the original script was that all the columns are the same width and with the data centred there is no way to intuitively know which columns are a pair. The column headers being right aligned did not help either.
This became more annoying once most pages had double columns.

Your solution resolves this. However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup, then a number of options arise,
A vertical border either side of the pair.
More padding on the left of the right column and on the right of the left column.

Much food for thought.

Re: AnnualDataSummary PHP

Posted: Sat 24 Nov 2012 4:03 am
by beteljuice
However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup
It is relatively straightforward to either overide or declare a (new) class / style so that eg. the 2nd (right) column of the pair was left justified. The existing cell padding would leave a differential gap.

In the tests I posted you will notice that this technique was used to center justify the headers over 'dual entry' columns.

Re: AnnualDataSummary PHP

Posted: Tue 01 Jan 2013 2:31 pm
by sfws
BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.
I've posted in http://sandaysoft.com/forum/viewtopic.php?f=18&t=6640 an update on year rollover - including a comparison of the PHP version you developed in this thread and the PHP version you've linked to from the Wiki. Could be a difference in our time zones issue or an error on my part, but one seemed on your 1 January to try to display 2013 before it was available, but all is right now its 2 January for you.

I edited the Wiki yesterday, and moved the bit I inserted to directly after your subsequent insert, trying to complement your style. I have put some explanation of my changes in http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 following on from the experiences noted there of someone trying to implement the JavaScript version.

Re: AnnualDataSummary PHP

Posted: Wed 02 Jan 2013 2:01 am
by BCJKiwi
This year rollover date fix (Posted 5 posts above this) survived the new Year and worked as expected.
BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.
We do need to -1 day.
Have looked in detail at what is on the hoster.
It is the 23/11/2012 here in NZ
The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
Cumulus (well, Windows 7) shows the exact same time stamp.
The data is for the 22nd.

The best solution I could come up with that should work regardless of the rollover time is :-

Code: Select all

// was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
	if (isset($_GET['year'])) {
		$tableYear=$_GET['year'];
	} else {
		if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
			$tableYear = date("Y", filemtime($dayfile)) -1 ;
			} else {
			$tableYear = date("Y", filemtime($dayfile)) ;
			}
		}
i.e. if the mod date of the file is the first day of the year use the previous year.

Re: AnnualDataSummary PHP

Posted: Wed 30 Jan 2019 8:53 pm
by dazza1223
sorry but i got the sql one ive tryed setting this up but all im geting is this

http://www.davisworthing.co.uk/datasummary.php



--------------------------------------------------------


in the php log it dumping a lote off erros

[Wed Jan 30 20:52:24.337677 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxRainRate in /home/pi/usb/website/datasummary.php on line 223, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.337725 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxRainRate in /home/pi/usb/website/datasummary.php on line 223, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.337918 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highAvgWspeed in /home/pi/usb/website/datasummary.php on line 224, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.338089 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highAvgWspeed in /home/pi/usb/website/datasummary.php on line 224, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.338145 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highWindGust in /home/pi/usb/website/datasummary.php on line 225, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.338174 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highWindGust in /home/pi/usb/website/datasummary.php on line 225, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.339662 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totWindRun in /home/pi/usb/website/datasummary.php on line 226, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.340554 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totWindRun in /home/pi/usb/website/datasummary.php on line 226, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.340821 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: domWindDir in /home/pi/usb/website/datasummary.php on line 227, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.341032 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: domWindDir in /home/pi/usb/website/datasummary.php on line 227, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.341096 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxPress in /home/pi/usb/website/datasummary.php on line 228, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.342065 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxPress in /home/pi/usb/website/datasummary.php on line 228, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.342356 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: minPress in /home/pi/usb/website/datasummary.php on line 229, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.342971 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: minPress in /home/pi/usb/website/datasummary.php on line 229, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.343132 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HighSolarRad in /home/pi/usb/website/datasummary.php on line 231, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.343172 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HighSolarRad in /home/pi/usb/website/datasummary.php on line 231, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.343949 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totalEvap in /home/pi/usb/website/datasummary.php on line 233, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.344079 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totalEvap in /home/pi/usb/website/datasummary.php on line 233, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.344120 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HeatDegDays in /home/pi/usb/website/datasummary.php on line 234, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.344184 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HeatDegDays in /home/pi/usb/website/datasummary.php on line 234, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.344218 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: CoolDegDays in /home/pi/usb/website/datasummary.php on line 235, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.344249 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: CoolDegDays in /home/pi/usb/website/datasummary.php on line 235, referer: http://www.davisworthing.co.uk/index.php
[Wed Jan 30 20:52:24.484430 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined variable: dataset in /home/pi/usb/website/datasummary.php on line 1072, referer: http://www.davisworthing.co.uk/index.php
:bash: